You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

78 lines
2.2 KiB

  1. /////////////////////////////////
  2. // DEFAULT SETTINGS
  3. Jcrop.defaults = {
  4. // Selection Behavior
  5. edge: { n: 0, s: 0, e: 0, w: 0 },
  6. setSelect: null,
  7. linked: true,
  8. linkCurrent: true,
  9. canDelete: true,
  10. canSelect: true,
  11. canDrag: true,
  12. canResize: true,
  13. // Component constructors
  14. eventManagerComponent: Jcrop.component.EventManager,
  15. keyboardComponent: Jcrop.component.Keyboard,
  16. dragstateComponent: Jcrop.component.DragState,
  17. stagemanagerComponent: Jcrop.component.StageManager,
  18. animatorComponent: Jcrop.component.Animator,
  19. selectionComponent: Jcrop.component.Selection,
  20. // This is a function that is called, which returns a stage object
  21. stageConstructor: Jcrop.stageConstructor,
  22. // Stage Behavior
  23. allowSelect: true,
  24. multi: false,
  25. multiMax: false,
  26. multiCleanup: true,
  27. animation: true,
  28. animEasing: 'swing',
  29. animDuration: 400,
  30. fading: true,
  31. fadeDuration: 300,
  32. fadeEasing: 'swing',
  33. bgColor: 'black',
  34. bgOpacity: .5,
  35. // Startup options
  36. applyFilters: [ 'constrain', 'extent', 'backoff', 'ratio', 'shader', 'round' ],
  37. borders: [ 'e', 'w', 's', 'n' ],
  38. handles: [ 'n', 's', 'e', 'w', 'sw', 'ne', 'nw', 'se' ],
  39. dragbars: [ 'n', 'e', 'w', 's' ],
  40. dragEventTarget: window,
  41. xscale: 1,
  42. yscale: 1,
  43. boxWidth: null,
  44. boxHeight: null,
  45. // CSS Classes
  46. // @todo: These need to be moved to top-level object keys
  47. // for better customization. Currently if you try to extend one
  48. // via an options object to Jcrop, it will wipe out all
  49. // the others you don't specify. Be careful for now!
  50. css_nodrag: 'jcrop-nodrag',
  51. css_drag: 'jcrop-drag',
  52. css_container: 'jcrop-active',
  53. css_shades: 'jcrop-shades',
  54. css_selection: 'jcrop-selection',
  55. css_borders: 'jcrop-border',
  56. css_handles: 'jcrop-handle jcrop-drag',
  57. css_button: 'jcrop-box jcrop-drag',
  58. css_noresize: 'jcrop-noresize',
  59. css_dragbars: 'jcrop-dragbar jcrop-drag',
  60. legacyHandlers: {
  61. onChange: 'cropmove',
  62. onSelect: 'cropend'
  63. }
  64. };