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