|
7 | 7 | </longdesc>
|
8 | 8 | <added>1.0</added>
|
9 | 9 | <options>
|
10 |
| - <option name="addClasses" type="Boolean" default="true"> |
| 10 | + <option name="addClasses" type="Boolean" default="true" example-value="false"> |
11 | 11 | <desc>If set to <code>false</code>, will prevent the <code>ui-draggable</code> class from being added. This may be desired as a performance optimization when calling <code>.draggable()</code> on hundreds of elements.</desc>
|
12 | 12 | </option>
|
13 |
| - <option name="appendTo" default='"parent"'> |
| 13 | + <option name="appendTo" default='"parent"' example-value='"body"'> |
14 | 14 | <desc>Which element the draggable helper should be appended to while dragging.</desc>
|
15 | 15 | <type name="jQuery">
|
16 | 16 | <desc>A jQuery object containing the element to append the helper to.</desc>
|
|
25 | 25 | <desc>The string <code>"parent"</code> will cause the helper to be a sibling of the draggable.</desc>
|
26 | 26 | </type>
|
27 | 27 | </option>
|
28 |
| - <option name="axis" type="String" default="false"> |
| 28 | + <option name="axis" type="String" default="false" example-value='"x"'> |
29 | 29 | <desc>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: <code>"x"</code>, <code>"y"</code>.</desc>
|
30 | 30 | </option>
|
31 |
| - <option name="cancel" type="Selector" default='"input,textarea,button,select,option"'> |
| 31 | + <option name="cancel" type="Selector" default='"input,textarea,button,select,option"' example-value='".title"'> |
32 | 32 | <desc>Prevents dragging from starting on specified elements.</desc>
|
33 | 33 | </option>
|
34 |
| - <option name="connectToSortable" type="Selector" default="false"> |
| 34 | + <option name="connectToSortable" type="Selector" default="false" example-value='"#my-sortable"'> |
35 | 35 | <desc>Allows the draggable to be dropped onto the specified sortables. If this option is used, a draggable can be dropped onto a sortable list and then becomes part of it. Note: The <a href="#option-helper"><code>helper</code></a> option must be set to <code>"clone"</code> in order to work flawlessly. Requires the <a href="/sortable/">jQuery UI Sortable plugin</a> to be included.</desc>
|
36 | 36 | </option>
|
37 |
| - <option name="containment" default="false"> |
| 37 | + <option name="containment" default="false" example-value='"parent"'> |
38 | 38 | <desc>Constrains dragging to within the bounds of the specified element or region.</desc>
|
39 | 39 | <type name="Selector">
|
40 | 40 | <desc>The draggable element will be contained to the bounding box of the first element found by the selector. If no element is found, no containment will be set.</desc>
|
|
49 | 49 | <desc>An array defining a bounding box in the form <code>[ x1, y1, x2, y2 ]</code>.</desc>
|
50 | 50 | </type>
|
51 | 51 | </option>
|
52 |
| - <option name="cursor" type="String" default='"auto"'> |
| 52 | + <option name="cursor" type="String" default='"auto"' example-value='"crosshair"'> |
53 | 53 | <desc>The CSS cursor during the drag operation.</desc>
|
54 | 54 | </option>
|
55 |
| - <option name="cursorAt" type="Object" default="false"> |
| 55 | + <option name="cursorAt" type="Object" default="false" example-value="{ left: 5 }"> |
56 | 56 | <desc>Sets the offset of the dragging helper relative to the mouse cursor. Coordinates can be given as a hash using a combination of one or two keys: <code>{ top, left, right, bottom }</code>.</desc>
|
57 | 57 | </option>
|
58 |
| - <option name="delay" type="Number" default="0"> |
| 58 | + <option name="delay" type="Number" default="0" example-value="300"> |
59 | 59 | <desc>Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</desc>
|
60 | 60 | </option>
|
61 | 61 | <xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
|
62 |
| - <option name="distance" type="Number" default="1"> |
| 62 | + <option name="distance" type="Number" default="1" example-value="10"> |
63 | 63 | <desc>Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</desc>
|
64 | 64 | </option>
|
65 |
| - <option name="grid" type="Array" default="false"> |
| 65 | + <option name="grid" type="Array" default="false" example-value="[ 50, 20 ]"> |
66 | 66 | <desc>Snaps the dragging helper to a grid, every x and y pixels. The array must be of the form <code>[ x, y ]</code>.</desc>
|
67 | 67 | </option>
|
68 |
| - <option name="handle" default="false"> |
| 68 | + <option name="handle" default="false" example-value='"h2"'> |
69 | 69 | <desc>If specified, restricts dragging from starting unless the mousedown occurs on the specified element(s).</desc>
|
70 | 70 | <type name="Selector"/>
|
71 | 71 | <type name="Element"/>
|
72 | 72 | </option>
|
73 |
| - <option name="helper" default='"original"'> |
| 73 | + <option name="helper" default='"original"' example-value='"clone"'> |
74 | 74 | <desc>Allows for a helper element to be used for dragging display.</desc>
|
75 | 75 | <type name="String">
|
76 | 76 | <desc>If set to <code>"clone"</code>, then the element will be cloned and the clone will be dragged.</desc>
|
|
79 | 79 | <desc>A function that will return a DOMElement to use while dragging.</desc>
|
80 | 80 | </type>
|
81 | 81 | </option>
|
82 |
| - <option name="iframeFix" default="false"> |
| 82 | + <option name="iframeFix" default="false" example-value="true"> |
83 | 83 | <desc>Prevent iframes from capturing the mousemove events during a drag. Useful in combination with the <a href="#option-cursorAt"><code>cursorAt</code></a> option, or in any case where the mouse cursor may not be over the helper.</desc>
|
84 | 84 | <type name="Boolean">
|
85 | 85 | <desc>When set to <code>true</code>, transparent overlays will be placed over all iframes on the page.</desc>
|
|
88 | 88 | <desc>Any iframes matching the selector will be covered by transparent overlays.</desc>
|
89 | 89 | </type>
|
90 | 90 | </option>
|
91 |
| - <option name="opacity" type="Number" default="false"> |
| 91 | + <option name="opacity" type="Number" default="false" example-value="0.35"> |
92 | 92 | <desc>Opacity for the helper while being dragged.</desc>
|
93 | 93 | </option>
|
94 |
| - <option name="refreshPositions" type="Boolean" default="false"> |
| 94 | + <option name="refreshPositions" type="Boolean" default="false" example-value="true"> |
95 | 95 | <desc>
|
96 | 96 | If set to <code>true</code>, all droppable positions are calculated on every mousemove.
|
97 | 97 | <em>Caution: This solves issues on highly dynamic pages, but dramatically decreases performance.</em>
|
98 | 98 | </desc>
|
99 | 99 | </option>
|
100 |
| - <option name="revert" default="false"> |
| 100 | + <option name="revert" default="false" example-value="true"> |
101 | 101 | <desc>Whether the element should revert to its start position when dragging stops.</desc>
|
102 | 102 | <type name="Boolean">
|
103 | 103 | <desc>If set to <code>true</code> the element will always revert.</desc>
|
|
106 | 106 | <desc>If set to <code>"invalid"</code>, revert will only occur if the draggable has not been dropped on a droppable. For <code>"valid"</code>, it's the other way around.</desc>
|
107 | 107 | </type>
|
108 | 108 | </option>
|
109 |
| - <option name="revertDuration" type="Number" default="500"> |
| 109 | + <option name="revertDuration" type="Number" default="500" example-value="200"> |
110 | 110 | <desc>The duration of the revert animation, in milliseconds. Ignored if the <a href="#option-revert"><code>revert</code></a> option is <code>false</code>.</desc>
|
111 | 111 | </option>
|
112 |
| - <option name="scope" type="String" default='"default"'> |
| 112 | + <option name="scope" type="String" default='"default"' example-value='"tasks"'> |
113 | 113 | <desc>Used to group sets of draggable and droppable items, in addition to droppable's <a href="/droppable#option-accept"><code>accept</code></a> option. A draggable with the same <code>scope</code> value as a droppable will be accepted by the droppable.</desc>
|
114 | 114 | </option>
|
115 |
| - <option name="scroll" type="Boolean" default="true"> |
| 115 | + <option name="scroll" type="Boolean" default="true" example-value="false"> |
116 | 116 | <desc>If set to <code>true</code>, container auto-scrolls while dragging.</desc>
|
117 | 117 | </option>
|
118 |
| - <option name="scrollSensitivity" type="Number" default="20"> |
| 118 | + <option name="scrollSensitivity" type="Number" default="20" example-value="100"> |
119 | 119 | <desc>Distance in pixels from the edge of the viewport after which the viewport should scroll. Distance is relative to pointer, not the draggable. Ignored if the <a href="#option-scroll"><code>scroll</code></a> option is <code>false</code>.</desc>
|
120 | 120 | </option>
|
121 |
| - <option name="scrollSpeed" type="Number" default="20"> |
| 121 | + <option name="scrollSpeed" type="Number" default="20" example-value="100"> |
122 | 122 | <desc>The speed at which the window should scroll once the mouse pointer gets within the <a href="#option-scrollSensitivity"><code>scrollSensitivity</code></a> distance. Ignored if the <a href="#option-scroll"><code>scroll</code></a> option is <code>false</code>.</desc>
|
123 | 123 | </option>
|
124 |
| - <option name="snap" default="false"> |
| 124 | + <option name="snap" default="false" example-value="true"> |
125 | 125 | <desc>Whether the element should snap to other elements.</desc>
|
126 | 126 | <type name="Boolean">
|
127 | 127 | <desc>When set to <code>true</code>, the element will snap to all other draggable elements.</desc>
|
|
130 | 130 | <desc>A selector specifying which elements to snap to.</desc>
|
131 | 131 | </type>
|
132 | 132 | </option>
|
133 |
| - <option name="snapMode" type="String" default='"both"'> |
| 133 | + <option name="snapMode" type="String" default='"both"' example-value='"inner"'> |
134 | 134 | <desc>Determines which edges of snap elements the draggable will snap to. Ignored if the <a href="#option-snap"><code>snap</code></a> option is <code>false</code>. Possible values: <code>"inner"</code>, <code>"outer"</code>, <code>"both"</code>.</desc>
|
135 | 135 | </option>
|
136 |
| - <option name="snapTolerance" type="Number" default="20"> |
| 136 | + <option name="snapTolerance" type="Number" default="20" example-value="30"> |
137 | 137 | <desc>The distance in pixels from the snap element edges at which snapping should occur. Ignored if the <a href="#option-snap"><code>snap</code></a> option is <code>false</code>.</desc>
|
138 | 138 | </option>
|
139 |
| - <option name="stack" type="Selector" default="false"> |
| 139 | + <option name="stack" type="Selector" default="false" example-value='".products"'> |
140 | 140 | <desc>Controls the z-index of the set of elements that match the selector, always brings the currently dragged item to the front. Very useful in things like window managers.</desc>
|
141 | 141 | </option>
|
142 |
| - <option name="zIndex" type="Number" default="false"> |
| 142 | + <option name="zIndex" type="Number" default="false" example-value="100"> |
143 | 143 | <desc>Z-index for the helper while being dragged.</desc>
|
144 | 144 | </option>
|
145 | 145 | </options>
|
|
0 commit comments