1 | <div class="body-wrap"> |
---|
2 | <div class="top-tools"> |
---|
3 | <a class="inner-link" href="#Ext.dd.DragDropMgr-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> |
---|
4 | <a class="inner-link" href="#Ext.dd.DragDropMgr-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> |
---|
5 | <a class="inner-link" href="#Ext.dd.DragDropMgr-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> |
---|
6 | <a class="bookmark" href="../docs/?class=Ext.dd.DragDropMgr"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> |
---|
7 | </div> |
---|
8 | <h1>Class Ext.dd.DragDropMgr</h1> |
---|
9 | <table cellspacing="0"> |
---|
10 | <tr><td class="label">Package:</td><td class="hd-info">Ext.dd</td></tr> |
---|
11 | <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/DDCore.js" target="_blank">DDCore.js</a></td></tr> |
---|
12 | <tr><td class="label">Class:</td><td class="hd-info">DragDropMgr</td></tr> |
---|
13 | <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr> |
---|
14 | </table> |
---|
15 | <div class="description"> |
---|
16 | DragDropMgr is a singleton that tracks the element interaction for |
---|
17 | all DragDrop items in the window. Generally, you will not call |
---|
18 | this class directly, but it does have helper methods that could |
---|
19 | be useful in your DragDrop implementations.<br><br><i>This class is a singleton and cannot be created directly.</i> </div> |
---|
20 | |
---|
21 | <div class="hr"></div> |
---|
22 | <a id="Ext.dd.DragDropMgr-props"></a> |
---|
23 | <h2>Public Properties</h2> |
---|
24 | <table cellspacing="0" class="member-table"> |
---|
25 | <tr> |
---|
26 | <th class="sig-header" colspan="2">Property</th> |
---|
27 | <th class="msource-header">Defined By</th> |
---|
28 | </tr> |
---|
29 | <tr class="property-row expandable"> |
---|
30 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
31 | <td class="sig"> |
---|
32 | <a id="Ext.dd.DragDropMgr-INTERSECT"></a> |
---|
33 | <b>INTERSECT</b> : int <div class="mdesc"> |
---|
34 | <div class="short"><static> In intersect mode, drag and drop interaction is defined by the |
---|
35 | overlap of two or more drag and drop ob...</div> |
---|
36 | <div class="long"> |
---|
37 | <static> In intersect mode, drag and drop interaction is defined by the |
---|
38 | overlap of two or more drag and drop objects. </div> |
---|
39 | </div> |
---|
40 | </td> |
---|
41 | <td class="msource">DragDropMgr</td> |
---|
42 | </tr> |
---|
43 | <tr class="property-row alt"> |
---|
44 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
45 | <td class="sig"> |
---|
46 | <a id="Ext.dd.DragDropMgr-POINT"></a> |
---|
47 | <b>POINT</b> : int <div class="mdesc"> |
---|
48 | <static> In point mode, drag and drop interaction is defined by the |
---|
49 | location of the cursor during the drag/drop </div> |
---|
50 | </td> |
---|
51 | <td class="msource">DragDropMgr</td> |
---|
52 | </tr> |
---|
53 | <tr class="property-row expandable"> |
---|
54 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
55 | <td class="sig"> |
---|
56 | <a id="Ext.dd.DragDropMgr-clickPixelThresh"></a> |
---|
57 | <b>clickPixelThresh</b> : int <div class="mdesc"> |
---|
58 | <div class="short"><static> The number of pixels that the mouse needs to move after the |
---|
59 | mousedown before the drag is initiated. D...</div> |
---|
60 | <div class="long"> |
---|
61 | <static> The number of pixels that the mouse needs to move after the |
---|
62 | mousedown before the drag is initiated. Default=3; </div> |
---|
63 | </div> |
---|
64 | </td> |
---|
65 | <td class="msource">DragDropMgr</td> |
---|
66 | </tr> |
---|
67 | <tr class="property-row alt expandable"> |
---|
68 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
69 | <td class="sig"> |
---|
70 | <a id="Ext.dd.DragDropMgr-clickTimeThresh"></a> |
---|
71 | <b>clickTimeThresh</b> : int <div class="mdesc"> |
---|
72 | <div class="short"><static> The number of milliseconds after the mousedown event to initiate the |
---|
73 | drag if we don't get a mouseup ev...</div> |
---|
74 | <div class="long"> |
---|
75 | <static> The number of milliseconds after the mousedown event to initiate the |
---|
76 | drag if we don't get a mouseup event. Default=1000 </div> |
---|
77 | </div> |
---|
78 | </td> |
---|
79 | <td class="msource">DragDropMgr</td> |
---|
80 | </tr> |
---|
81 | <tr class="property-row"> |
---|
82 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
83 | <td class="sig"> |
---|
84 | <a id="Ext.dd.DragDropMgr-css"></a> |
---|
85 | <b>css</b> : Object <div class="mdesc"> |
---|
86 | A reference to the style property </div> |
---|
87 | </td> |
---|
88 | <td class="msource">DragDropMgr</td> |
---|
89 | </tr> |
---|
90 | <tr class="property-row alt"> |
---|
91 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
92 | <td class="sig"> |
---|
93 | <a id="Ext.dd.DragDropMgr-el"></a> |
---|
94 | <b>el</b> : Object <div class="mdesc"> |
---|
95 | The element </div> |
---|
96 | </td> |
---|
97 | <td class="msource">DragDropMgr</td> |
---|
98 | </tr> |
---|
99 | <tr class="property-row"> |
---|
100 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
101 | <td class="sig"> |
---|
102 | <a id="Ext.dd.DragDropMgr-id"></a> |
---|
103 | <b>id</b> : Object <div class="mdesc"> |
---|
104 | The element id </div> |
---|
105 | </td> |
---|
106 | <td class="msource">DragDropMgr</td> |
---|
107 | </tr> |
---|
108 | <tr class="property-row alt"> |
---|
109 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
110 | <td class="sig"> |
---|
111 | <a id="Ext.dd.DragDropMgr-mode"></a> |
---|
112 | <b>mode</b> : int <div class="mdesc"> |
---|
113 | <static> The current drag and drop mode. Default: POINT </div> |
---|
114 | </td> |
---|
115 | <td class="msource">DragDropMgr</td> |
---|
116 | </tr> |
---|
117 | <tr class="property-row expandable"> |
---|
118 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
119 | <td class="sig"> |
---|
120 | <a id="Ext.dd.DragDropMgr-preventDefault"></a> |
---|
121 | <b>preventDefault</b> : boolean <div class="mdesc"> |
---|
122 | <div class="short"><static> Flag to determine if we should prevent the default behavior of the |
---|
123 | events we define. By default this i...</div> |
---|
124 | <div class="long"> |
---|
125 | <static> Flag to determine if we should prevent the default behavior of the |
---|
126 | events we define. By default this is true, but this can be set to |
---|
127 | false if you need the default behavior (not recommended) </div> |
---|
128 | </div> |
---|
129 | </td> |
---|
130 | <td class="msource">DragDropMgr</td> |
---|
131 | </tr> |
---|
132 | <tr class="property-row alt expandable"> |
---|
133 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
134 | <td class="sig"> |
---|
135 | <a id="Ext.dd.DragDropMgr-stopPropagation"></a> |
---|
136 | <b>stopPropagation</b> : boolean <div class="mdesc"> |
---|
137 | <div class="short"><static> Flag to determine if we should stop the propagation of the events |
---|
138 | we generate. This is true by default...</div> |
---|
139 | <div class="long"> |
---|
140 | <static> Flag to determine if we should stop the propagation of the events |
---|
141 | we generate. This is true by default but you may want to set it to |
---|
142 | false if the html element contains other features that require the |
---|
143 | mouse click. </div> |
---|
144 | </div> |
---|
145 | </td> |
---|
146 | <td class="msource">DragDropMgr</td> |
---|
147 | </tr> |
---|
148 | <tr class="property-row expandable"> |
---|
149 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
150 | <td class="sig"> |
---|
151 | <a id="Ext.dd.DragDropMgr-useCache"></a> |
---|
152 | <b>useCache</b> : boolean <div class="mdesc"> |
---|
153 | <div class="short"><static> Set useCache to false if you want to force object the lookup of each |
---|
154 | drag and drop linked element cons...</div> |
---|
155 | <div class="long"> |
---|
156 | <static> Set useCache to false if you want to force object the lookup of each |
---|
157 | drag and drop linked element constantly during a drag. </div> |
---|
158 | </div> |
---|
159 | </td> |
---|
160 | <td class="msource">DragDropMgr</td> |
---|
161 | </tr> |
---|
162 | </table> |
---|
163 | <a id="Ext.dd.DragDropMgr-methods"></a> |
---|
164 | <h2>Public Methods</h2> |
---|
165 | <table cellspacing="0" class="member-table"> |
---|
166 | <tr> |
---|
167 | <th class="sig-header" colspan="2">Method</th> |
---|
168 | <th class="msource-header">Defined By</th> |
---|
169 | </tr> |
---|
170 | <tr class="method-row expandable"> |
---|
171 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
172 | <td class="sig"> |
---|
173 | <a id="Ext.dd.DragDropMgr-getBestMatch"></a> |
---|
174 | <b>getBestMatch</b>( <code>DragDrop[] dds</code> ) : DragDrop <div class="mdesc"> |
---|
175 | <div class="short"><static> Helper function for getting the best match from the list of drag |
---|
176 | and drop objects returned by the drag...</div> |
---|
177 | <div class="long"> |
---|
178 | <static> Helper function for getting the best match from the list of drag |
---|
179 | and drop objects returned by the drag and drop events when we are |
---|
180 | in INTERSECT mode. It returns either the first object that the |
---|
181 | cursor is over, or the object that has the greatest overlap with |
---|
182 | the dragged element. <div class="mdetail-params"> |
---|
183 | <strong>Parameters:</strong> |
---|
184 | <ul><li><code>dds</code> : DragDrop[]<div class="sub-desc">The array of drag and drop objects |
---|
185 | targeted</div></li> </ul> |
---|
186 | <strong>Returns:</strong> |
---|
187 | <ul> |
---|
188 | <li><code>DragDrop</code><div class="sub-desc">The best single match</div></li> |
---|
189 | </ul> |
---|
190 | </div> |
---|
191 | </div> |
---|
192 | </div> |
---|
193 | </td> |
---|
194 | <td class="msource">DragDropMgr</td> |
---|
195 | </tr> |
---|
196 | <tr class="method-row alt expandable"> |
---|
197 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
198 | <td class="sig"> |
---|
199 | <a id="Ext.dd.DragDropMgr-getCss"></a> |
---|
200 | <b>getCss</b>( <code>String id</code> ) : Object <div class="mdesc"> |
---|
201 | <div class="short"><b>Deprecated.</b> <static> Returns the style property for the DOM element (i.e., |
---|
202 | document.getElById(id).style)</div> |
---|
203 | <div class="long"> |
---|
204 | <b>Deprecated.</b> <static> Returns the style property for the DOM element (i.e., |
---|
205 | document.getElById(id).style) <div class="mdetail-params"> |
---|
206 | <strong>Parameters:</strong> |
---|
207 | <ul><li><code>id</code> : String<div class="sub-desc">the id of the elment to get</div></li> </ul> |
---|
208 | <strong>Returns:</strong> |
---|
209 | <ul> |
---|
210 | <li><code>Object</code><div class="sub-desc">The style property of the element</div></li> |
---|
211 | </ul> |
---|
212 | </div> |
---|
213 | </div> |
---|
214 | </div> |
---|
215 | </td> |
---|
216 | <td class="msource">DragDropMgr</td> |
---|
217 | </tr> |
---|
218 | <tr class="method-row expandable"> |
---|
219 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
220 | <td class="sig"> |
---|
221 | <a id="Ext.dd.DragDropMgr-getDDById"></a> |
---|
222 | <b>getDDById</b>( <code>String id</code> ) : DragDrop <div class="mdesc"> |
---|
223 | <div class="short"><static> Returns the DragDrop instance for a given id</div> |
---|
224 | <div class="long"> |
---|
225 | <static> Returns the DragDrop instance for a given id <div class="mdetail-params"> |
---|
226 | <strong>Parameters:</strong> |
---|
227 | <ul><li><code>id</code> : String<div class="sub-desc">the id of the DragDrop object</div></li> </ul> |
---|
228 | <strong>Returns:</strong> |
---|
229 | <ul> |
---|
230 | <li><code>DragDrop</code><div class="sub-desc">the drag drop object, null if it is not found</div></li> |
---|
231 | </ul> |
---|
232 | </div> |
---|
233 | </div> |
---|
234 | </div> |
---|
235 | </td> |
---|
236 | <td class="msource">DragDropMgr</td> |
---|
237 | </tr> |
---|
238 | <tr class="method-row alt expandable"> |
---|
239 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
240 | <td class="sig"> |
---|
241 | <a id="Ext.dd.DragDropMgr-getElement"></a> |
---|
242 | <b>getElement</b>( <code>String id</code> ) : Object <div class="mdesc"> |
---|
243 | <div class="short"><b>Deprecated.</b> <static> Returns the actual DOM element</div> |
---|
244 | <div class="long"> |
---|
245 | <b>Deprecated.</b> <static> Returns the actual DOM element <div class="mdetail-params"> |
---|
246 | <strong>Parameters:</strong> |
---|
247 | <ul><li><code>id</code> : String<div class="sub-desc">the id of the elment to get</div></li> </ul> |
---|
248 | <strong>Returns:</strong> |
---|
249 | <ul> |
---|
250 | <li><code>Object</code><div class="sub-desc">The element</div></li> |
---|
251 | </ul> |
---|
252 | </div> |
---|
253 | </div> |
---|
254 | </div> |
---|
255 | </td> |
---|
256 | <td class="msource">DragDropMgr</td> |
---|
257 | </tr> |
---|
258 | <tr class="method-row expandable"> |
---|
259 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
260 | <td class="sig"> |
---|
261 | <a id="Ext.dd.DragDropMgr-getLocation"></a> |
---|
262 | <b>getLocation</b>( <code>DragDrop oDD</code> ) : Ext.lib.Region <div class="mdesc"> |
---|
263 | <div class="short"><static> Returns a Region object containing the drag and drop element's position |
---|
264 | and size, including the paddin...</div> |
---|
265 | <div class="long"> |
---|
266 | <static> Returns a Region object containing the drag and drop element's position |
---|
267 | and size, including the padding configured for it <div class="mdetail-params"> |
---|
268 | <strong>Parameters:</strong> |
---|
269 | <ul><li><code>oDD</code> : DragDrop<div class="sub-desc">the drag and drop object to get the |
---|
270 | location for</div></li> </ul> |
---|
271 | <strong>Returns:</strong> |
---|
272 | <ul> |
---|
273 | <li><code>Ext.lib.Region</code><div class="sub-desc">a Region object representing the total area the element occupies, including any padding the instance is configured for.</div></li> |
---|
274 | </ul> |
---|
275 | </div> |
---|
276 | </div> |
---|
277 | </div> |
---|
278 | </td> |
---|
279 | <td class="msource">DragDropMgr</td> |
---|
280 | </tr> |
---|
281 | <tr class="method-row alt expandable"> |
---|
282 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
283 | <td class="sig"> |
---|
284 | <a id="Ext.dd.DragDropMgr-getPosX"></a> |
---|
285 | <b>getPosX</b>( <code>el the</code> ) : int <div class="mdesc"> |
---|
286 | <div class="short"><b>Deprecated.</b> <static> Returns the X position of an html element</div> |
---|
287 | <div class="long"> |
---|
288 | <b>Deprecated.</b> <static> Returns the X position of an html element <div class="mdetail-params"> |
---|
289 | <strong>Parameters:</strong> |
---|
290 | <ul><li><code>the</code> : el<div class="sub-desc">element for which to get the position</div></li> </ul> |
---|
291 | <strong>Returns:</strong> |
---|
292 | <ul> |
---|
293 | <li><code>int</code><div class="sub-desc">the X coordinate @for DragDropMgr</div></li> |
---|
294 | </ul> |
---|
295 | </div> |
---|
296 | </div> |
---|
297 | </div> |
---|
298 | </td> |
---|
299 | <td class="msource">DragDropMgr</td> |
---|
300 | </tr> |
---|
301 | <tr class="method-row expandable"> |
---|
302 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
303 | <td class="sig"> |
---|
304 | <a id="Ext.dd.DragDropMgr-getPosY"></a> |
---|
305 | <b>getPosY</b>( <code>el the</code> ) : int <div class="mdesc"> |
---|
306 | <div class="short"><b>Deprecated.</b> <static> Returns the Y position of an html element</div> |
---|
307 | <div class="long"> |
---|
308 | <b>Deprecated.</b> <static> Returns the Y position of an html element <div class="mdetail-params"> |
---|
309 | <strong>Parameters:</strong> |
---|
310 | <ul><li><code>the</code> : el<div class="sub-desc">element for which to get the position</div></li> </ul> |
---|
311 | <strong>Returns:</strong> |
---|
312 | <ul> |
---|
313 | <li><code>int</code><div class="sub-desc">the Y coordinate</div></li> |
---|
314 | </ul> |
---|
315 | </div> |
---|
316 | </div> |
---|
317 | </div> |
---|
318 | </td> |
---|
319 | <td class="msource">DragDropMgr</td> |
---|
320 | </tr> |
---|
321 | <tr class="method-row alt expandable"> |
---|
322 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
323 | <td class="sig"> |
---|
324 | <a id="Ext.dd.DragDropMgr-getRelated"></a> |
---|
325 | <b>getRelated</b>( <code>DragDrop p_oDD</code>, <code>boolean bTargetsOnly</code> ) : DragDrop[] <div class="mdesc"> |
---|
326 | <div class="short"><static> Returns the drag and drop instances that are in all groups the |
---|
327 | passed in instance belongs to.</div> |
---|
328 | <div class="long"> |
---|
329 | <static> Returns the drag and drop instances that are in all groups the |
---|
330 | passed in instance belongs to. <div class="mdetail-params"> |
---|
331 | <strong>Parameters:</strong> |
---|
332 | <ul><li><code>p_oDD</code> : DragDrop<div class="sub-desc">the obj to get related data for</div></li><li><code>bTargetsOnly</code> : boolean<div class="sub-desc">if true, only return targetable objs</div></li> </ul> |
---|
333 | <strong>Returns:</strong> |
---|
334 | <ul> |
---|
335 | <li><code>DragDrop[]</code><div class="sub-desc">the related instances</div></li> |
---|
336 | </ul> |
---|
337 | </div> |
---|
338 | </div> |
---|
339 | </div> |
---|
340 | </td> |
---|
341 | <td class="msource">DragDropMgr</td> |
---|
342 | </tr> |
---|
343 | <tr class="method-row expandable"> |
---|
344 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
345 | <td class="sig"> |
---|
346 | <a id="Ext.dd.DragDropMgr-getScrollLeft"></a> |
---|
347 | <b>getScrollLeft</b>() : int <div class="mdesc"> |
---|
348 | <div class="short"><static> Gets the scrollLeft</div> |
---|
349 | <div class="long"> |
---|
350 | <static> Gets the scrollLeft <div class="mdetail-params"> |
---|
351 | <strong>Parameters:</strong> |
---|
352 | <ul><li>None.</li> </ul> |
---|
353 | <strong>Returns:</strong> |
---|
354 | <ul> |
---|
355 | <li><code>int</code><div class="sub-desc">the document's scrollTop</div></li> |
---|
356 | </ul> |
---|
357 | </div> |
---|
358 | </div> |
---|
359 | </div> |
---|
360 | </td> |
---|
361 | <td class="msource">DragDropMgr</td> |
---|
362 | </tr> |
---|
363 | <tr class="method-row alt expandable"> |
---|
364 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
365 | <td class="sig"> |
---|
366 | <a id="Ext.dd.DragDropMgr-getScrollTop"></a> |
---|
367 | <b>getScrollTop</b>() : int <div class="mdesc"> |
---|
368 | <div class="short"><static> Gets the scrollTop</div> |
---|
369 | <div class="long"> |
---|
370 | <static> Gets the scrollTop <div class="mdetail-params"> |
---|
371 | <strong>Parameters:</strong> |
---|
372 | <ul><li>None.</li> </ul> |
---|
373 | <strong>Returns:</strong> |
---|
374 | <ul> |
---|
375 | <li><code>int</code><div class="sub-desc">the document's scrollTop</div></li> |
---|
376 | </ul> |
---|
377 | </div> |
---|
378 | </div> |
---|
379 | </div> |
---|
380 | </td> |
---|
381 | <td class="msource">DragDropMgr</td> |
---|
382 | </tr> |
---|
383 | <tr class="method-row expandable"> |
---|
384 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
385 | <td class="sig"> |
---|
386 | <a id="Ext.dd.DragDropMgr-getStyle"></a> |
---|
387 | <b>getStyle</b>( <code>HTMLElement el</code>, <code>string styleProp</code> ) : string <div class="mdesc"> |
---|
388 | <div class="short"><b>Deprecated.</b> <static> Returns the specified element style property</div> |
---|
389 | <div class="long"> |
---|
390 | <b>Deprecated.</b> <static> Returns the specified element style property <div class="mdetail-params"> |
---|
391 | <strong>Parameters:</strong> |
---|
392 | <ul><li><code>el</code> : HTMLElement<div class="sub-desc">the element</div></li><li><code>styleProp</code> : string<div class="sub-desc">the style property</div></li> </ul> |
---|
393 | <strong>Returns:</strong> |
---|
394 | <ul> |
---|
395 | <li><code>string</code><div class="sub-desc">The value of the style property</div></li> |
---|
396 | </ul> |
---|
397 | </div> |
---|
398 | </div> |
---|
399 | </div> |
---|
400 | </td> |
---|
401 | <td class="msource">DragDropMgr</td> |
---|
402 | </tr> |
---|
403 | <tr class="method-row alt expandable"> |
---|
404 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
405 | <td class="sig"> |
---|
406 | <a id="Ext.dd.DragDropMgr-handleWasClicked"></a> |
---|
407 | <b>handleWasClicked</b>( <code>node the</code> ) : void <div class="mdesc"> |
---|
408 | <div class="short"><static> Recursively searches the immediate parent and all child nodes for |
---|
409 | the handle element in order to deter...</div> |
---|
410 | <div class="long"> |
---|
411 | <static> Recursively searches the immediate parent and all child nodes for |
---|
412 | the handle element in order to determine wheter or not it was |
---|
413 | clicked. <div class="mdetail-params"> |
---|
414 | <strong>Parameters:</strong> |
---|
415 | <ul><li><code>the</code> : node<div class="sub-desc">html element to inspect</div></li> </ul> |
---|
416 | <strong>Returns:</strong> |
---|
417 | <ul> |
---|
418 | <li><code>void</code></li> |
---|
419 | </ul> |
---|
420 | </div> |
---|
421 | </div> |
---|
422 | </div> |
---|
423 | </td> |
---|
424 | <td class="msource">DragDropMgr</td> |
---|
425 | </tr> |
---|
426 | <tr class="method-row expandable"> |
---|
427 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
428 | <td class="sig"> |
---|
429 | <a id="Ext.dd.DragDropMgr-isDragDrop"></a> |
---|
430 | <b>isDragDrop</b>( <code>String id</code> ) : boolean <div class="mdesc"> |
---|
431 | <div class="short"><static> Utility function to determine if a given element has been |
---|
432 | registered as a drag drop item.</div> |
---|
433 | <div class="long"> |
---|
434 | <static> Utility function to determine if a given element has been |
---|
435 | registered as a drag drop item. <div class="mdetail-params"> |
---|
436 | <strong>Parameters:</strong> |
---|
437 | <ul><li><code>id</code> : String<div class="sub-desc">the element id to check</div></li> </ul> |
---|
438 | <strong>Returns:</strong> |
---|
439 | <ul> |
---|
440 | <li><code>boolean</code><div class="sub-desc">true if this element is a DragDrop item, false otherwise</div></li> |
---|
441 | </ul> |
---|
442 | </div> |
---|
443 | </div> |
---|
444 | </div> |
---|
445 | </td> |
---|
446 | <td class="msource">DragDropMgr</td> |
---|
447 | </tr> |
---|
448 | <tr class="method-row alt expandable"> |
---|
449 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
450 | <td class="sig"> |
---|
451 | <a id="Ext.dd.DragDropMgr-isHandle"></a> |
---|
452 | <b>isHandle</b>( <code>String id</code> ) : boolean <div class="mdesc"> |
---|
453 | <div class="short"><static> Utility function to determine if a given element has been |
---|
454 | registered as a drag drop handle for the giv...</div> |
---|
455 | <div class="long"> |
---|
456 | <static> Utility function to determine if a given element has been |
---|
457 | registered as a drag drop handle for the given Drag Drop object. <div class="mdetail-params"> |
---|
458 | <strong>Parameters:</strong> |
---|
459 | <ul><li><code>id</code> : String<div class="sub-desc">the element id to check</div></li> </ul> |
---|
460 | <strong>Returns:</strong> |
---|
461 | <ul> |
---|
462 | <li><code>boolean</code><div class="sub-desc">true if this element is a DragDrop handle, false otherwise</div></li> |
---|
463 | </ul> |
---|
464 | </div> |
---|
465 | </div> |
---|
466 | </div> |
---|
467 | </td> |
---|
468 | <td class="msource">DragDropMgr</td> |
---|
469 | </tr> |
---|
470 | <tr class="method-row expandable"> |
---|
471 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
472 | <td class="sig"> |
---|
473 | <a id="Ext.dd.DragDropMgr-isLegalTarget"></a> |
---|
474 | <b>isLegalTarget</b>( <code>DragDrop the</code>, <code>DragDrop the</code> ) : boolean <div class="mdesc"> |
---|
475 | <div class="short"><static> Returns true if the specified dd target is a legal target for |
---|
476 | the specifice drag obj</div> |
---|
477 | <div class="long"> |
---|
478 | <static> Returns true if the specified dd target is a legal target for |
---|
479 | the specifice drag obj <div class="mdetail-params"> |
---|
480 | <strong>Parameters:</strong> |
---|
481 | <ul><li><code>the</code> : DragDrop<div class="sub-desc">drag obj</div></li><li><code>the</code> : DragDrop<div class="sub-desc">target</div></li> </ul> |
---|
482 | <strong>Returns:</strong> |
---|
483 | <ul> |
---|
484 | <li><code>boolean</code><div class="sub-desc">true if the target is a legal target for the dd obj</div></li> |
---|
485 | </ul> |
---|
486 | </div> |
---|
487 | </div> |
---|
488 | </div> |
---|
489 | </td> |
---|
490 | <td class="msource">DragDropMgr</td> |
---|
491 | </tr> |
---|
492 | <tr class="method-row alt expandable"> |
---|
493 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
494 | <td class="sig"> |
---|
495 | <a id="Ext.dd.DragDropMgr-isLocked"></a> |
---|
496 | <b>isLocked</b>() : boolean <div class="mdesc"> |
---|
497 | <div class="short"><static> Is drag and drop locked?</div> |
---|
498 | <div class="long"> |
---|
499 | <static> Is drag and drop locked? <div class="mdetail-params"> |
---|
500 | <strong>Parameters:</strong> |
---|
501 | <ul><li>None.</li> </ul> |
---|
502 | <strong>Returns:</strong> |
---|
503 | <ul> |
---|
504 | <li><code>boolean</code><div class="sub-desc">True if drag and drop is locked, false otherwise.</div></li> |
---|
505 | </ul> |
---|
506 | </div> |
---|
507 | </div> |
---|
508 | </div> |
---|
509 | </td> |
---|
510 | <td class="msource">DragDropMgr</td> |
---|
511 | </tr> |
---|
512 | <tr class="method-row expandable"> |
---|
513 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
514 | <td class="sig"> |
---|
515 | <a id="Ext.dd.DragDropMgr-isTypeOfDD"></a> |
---|
516 | <b>isTypeOfDD</b>( <code>Object the</code> ) : boolean <div class="mdesc"> |
---|
517 | <div class="short"><static> My goal is to be able to transparently determine if an object is |
---|
518 | typeof DragDrop, and the exact subcla...</div> |
---|
519 | <div class="long"> |
---|
520 | <static> My goal is to be able to transparently determine if an object is |
---|
521 | typeof DragDrop, and the exact subclass of DragDrop. typeof |
---|
522 | returns "object", oDD.constructor.toString() always returns |
---|
523 | "DragDrop" and not the name of the subclass. So for now it just |
---|
524 | evaluates a well-known variable in DragDrop. <div class="mdetail-params"> |
---|
525 | <strong>Parameters:</strong> |
---|
526 | <ul><li><code>the</code> : Object<div class="sub-desc">object to evaluate</div></li> </ul> |
---|
527 | <strong>Returns:</strong> |
---|
528 | <ul> |
---|
529 | <li><code>boolean</code><div class="sub-desc">true if typeof oDD = DragDrop</div></li> |
---|
530 | </ul> |
---|
531 | </div> |
---|
532 | </div> |
---|
533 | </div> |
---|
534 | </td> |
---|
535 | <td class="msource">DragDropMgr</td> |
---|
536 | </tr> |
---|
537 | <tr class="method-row alt expandable"> |
---|
538 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
539 | <td class="sig"> |
---|
540 | <a id="Ext.dd.DragDropMgr-lock"></a> |
---|
541 | <b>lock</b>() : void <div class="mdesc"> |
---|
542 | <div class="short"><static> Lock all drag and drop functionality</div> |
---|
543 | <div class="long"> |
---|
544 | <static> Lock all drag and drop functionality <div class="mdetail-params"> |
---|
545 | <strong>Parameters:</strong> |
---|
546 | <ul><li>None.</li> </ul> |
---|
547 | <strong>Returns:</strong> |
---|
548 | <ul> |
---|
549 | <li><code>void</code></li> |
---|
550 | </ul> |
---|
551 | </div> |
---|
552 | </div> |
---|
553 | </div> |
---|
554 | </td> |
---|
555 | <td class="msource">DragDropMgr</td> |
---|
556 | </tr> |
---|
557 | <tr class="method-row expandable"> |
---|
558 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
559 | <td class="sig"> |
---|
560 | <a id="Ext.dd.DragDropMgr-moveToEl"></a> |
---|
561 | <b>moveToEl</b>( <code>HTMLElement moveEl</code>, <code>HTMLElement targetEl</code> ) : void <div class="mdesc"> |
---|
562 | <div class="short"><static> Sets the x/y position of an element to the location of the |
---|
563 | target element.</div> |
---|
564 | <div class="long"> |
---|
565 | <static> Sets the x/y position of an element to the location of the |
---|
566 | target element. <div class="mdetail-params"> |
---|
567 | <strong>Parameters:</strong> |
---|
568 | <ul><li><code>moveEl</code> : HTMLElement<div class="sub-desc">The element to move</div></li><li><code>targetEl</code> : HTMLElement<div class="sub-desc">The position reference element</div></li> </ul> |
---|
569 | <strong>Returns:</strong> |
---|
570 | <ul> |
---|
571 | <li><code>void</code></li> |
---|
572 | </ul> |
---|
573 | </div> |
---|
574 | </div> |
---|
575 | </div> |
---|
576 | </td> |
---|
577 | <td class="msource">DragDropMgr</td> |
---|
578 | </tr> |
---|
579 | <tr class="method-row alt expandable"> |
---|
580 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
581 | <td class="sig"> |
---|
582 | <a id="Ext.dd.DragDropMgr-numericSort"></a> |
---|
583 | <b>numericSort</b>() : void <div class="mdesc"> |
---|
584 | <div class="short"><static> Numeric array sort function</div> |
---|
585 | <div class="long"> |
---|
586 | <static> Numeric array sort function <div class="mdetail-params"> |
---|
587 | <strong>Parameters:</strong> |
---|
588 | <ul><li>None.</li> </ul> |
---|
589 | <strong>Returns:</strong> |
---|
590 | <ul> |
---|
591 | <li><code>void</code></li> |
---|
592 | </ul> |
---|
593 | </div> |
---|
594 | </div> |
---|
595 | </div> |
---|
596 | </td> |
---|
597 | <td class="msource">DragDropMgr</td> |
---|
598 | </tr> |
---|
599 | <tr class="method-row expandable"> |
---|
600 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
601 | <td class="sig"> |
---|
602 | <a id="Ext.dd.DragDropMgr-refreshCache"></a> |
---|
603 | <b>refreshCache</b>( <code>Object groups</code> ) : void <div class="mdesc"> |
---|
604 | <div class="short"><static> Refreshes the cache of the top-left and bottom-right points of the |
---|
605 | drag and drop objects in the specif...</div> |
---|
606 | <div class="long"> |
---|
607 | <static> Refreshes the cache of the top-left and bottom-right points of the |
---|
608 | drag and drop objects in the specified group(s). This is in the |
---|
609 | format that is stored in the drag and drop instance, so typical |
---|
610 | usage is: |
---|
611 | <code> |
---|
612 | Ext.dd.DragDropMgr.refreshCache(ddinstance.groups); |
---|
613 | </code> |
---|
614 | Alternatively: |
---|
615 | <code> |
---|
616 | Ext.dd.DragDropMgr.refreshCache({group1:true, group2:true}); |
---|
617 | </code> |
---|
618 | @TODO this really should be an indexed array. Alternatively this |
---|
619 | method could accept both. <div class="mdetail-params"> |
---|
620 | <strong>Parameters:</strong> |
---|
621 | <ul><li><code>groups</code> : Object<div class="sub-desc">an associative array of groups to refresh</div></li> </ul> |
---|
622 | <strong>Returns:</strong> |
---|
623 | <ul> |
---|
624 | <li><code>void</code></li> |
---|
625 | </ul> |
---|
626 | </div> |
---|
627 | </div> |
---|
628 | </div> |
---|
629 | </td> |
---|
630 | <td class="msource">DragDropMgr</td> |
---|
631 | </tr> |
---|
632 | <tr class="method-row alt expandable"> |
---|
633 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
634 | <td class="sig"> |
---|
635 | <a id="Ext.dd.DragDropMgr-regDragDrop"></a> |
---|
636 | <b>regDragDrop</b>( <code>DragDrop oDD</code>, <code>String sGroup</code> ) : void <div class="mdesc"> |
---|
637 | <div class="short"><static> Each DragDrop instance must be registered with the DragDropMgr. |
---|
638 | This is executed in DragDrop.init()</div> |
---|
639 | <div class="long"> |
---|
640 | <static> Each DragDrop instance must be registered with the DragDropMgr. |
---|
641 | This is executed in DragDrop.init() <div class="mdetail-params"> |
---|
642 | <strong>Parameters:</strong> |
---|
643 | <ul><li><code>oDD</code> : DragDrop<div class="sub-desc">the DragDrop object to register</div></li><li><code>sGroup</code> : String<div class="sub-desc">the name of the group this element belongs to</div></li> </ul> |
---|
644 | <strong>Returns:</strong> |
---|
645 | <ul> |
---|
646 | <li><code>void</code></li> |
---|
647 | </ul> |
---|
648 | </div> |
---|
649 | </div> |
---|
650 | </div> |
---|
651 | </td> |
---|
652 | <td class="msource">DragDropMgr</td> |
---|
653 | </tr> |
---|
654 | <tr class="method-row expandable"> |
---|
655 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
656 | <td class="sig"> |
---|
657 | <a id="Ext.dd.DragDropMgr-regHandle"></a> |
---|
658 | <b>regHandle</b>( <code>String sDDId</code>, <code>String sHandleId</code> ) : void <div class="mdesc"> |
---|
659 | <div class="short"><static> Each DragDrop handle element must be registered. This is done |
---|
660 | automatically when executing DragDrop.s...</div> |
---|
661 | <div class="long"> |
---|
662 | <static> Each DragDrop handle element must be registered. This is done |
---|
663 | automatically when executing DragDrop.setHandleElId() <div class="mdetail-params"> |
---|
664 | <strong>Parameters:</strong> |
---|
665 | <ul><li><code>sDDId</code> : String<div class="sub-desc">the DragDrop id this element is a handle for</div></li><li><code>sHandleId</code> : String<div class="sub-desc">the id of the element that is the drag |
---|
666 | handle</div></li> </ul> |
---|
667 | <strong>Returns:</strong> |
---|
668 | <ul> |
---|
669 | <li><code>void</code></li> |
---|
670 | </ul> |
---|
671 | </div> |
---|
672 | </div> |
---|
673 | </div> |
---|
674 | </td> |
---|
675 | <td class="msource">DragDropMgr</td> |
---|
676 | </tr> |
---|
677 | <tr class="method-row alt expandable"> |
---|
678 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
679 | <td class="sig"> |
---|
680 | <a id="Ext.dd.DragDropMgr-startDrag"></a> |
---|
681 | <b>startDrag</b>( <code>x {int}</code>, <code>y {int}</code> ) : void <div class="mdesc"> |
---|
682 | <div class="short"><static> Fired when either the drag pixel threshol or the mousedown hold |
---|
683 | time threshold has been met.</div> |
---|
684 | <div class="long"> |
---|
685 | <static> Fired when either the drag pixel threshol or the mousedown hold |
---|
686 | time threshold has been met. <div class="mdetail-params"> |
---|
687 | <strong>Parameters:</strong> |
---|
688 | <ul><li><code>{int}</code> : x<div class="sub-desc">the X position of the original mousedown</div></li><li><code>{int}</code> : y<div class="sub-desc">the Y position of the original mousedown</div></li> </ul> |
---|
689 | <strong>Returns:</strong> |
---|
690 | <ul> |
---|
691 | <li><code>void</code></li> |
---|
692 | </ul> |
---|
693 | </div> |
---|
694 | </div> |
---|
695 | </div> |
---|
696 | </td> |
---|
697 | <td class="msource">DragDropMgr</td> |
---|
698 | </tr> |
---|
699 | <tr class="method-row expandable"> |
---|
700 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
701 | <td class="sig"> |
---|
702 | <a id="Ext.dd.DragDropMgr-stopEvent"></a> |
---|
703 | <b>stopEvent</b>( <code>Event e</code> ) : void <div class="mdesc"> |
---|
704 | <div class="short"><static> Utility to stop event propagation and event default, if these |
---|
705 | features are turned on.</div> |
---|
706 | <div class="long"> |
---|
707 | <static> Utility to stop event propagation and event default, if these |
---|
708 | features are turned on. <div class="mdetail-params"> |
---|
709 | <strong>Parameters:</strong> |
---|
710 | <ul><li><code>e</code> : Event<div class="sub-desc">the event as returned by this.getEvent()</div></li> </ul> |
---|
711 | <strong>Returns:</strong> |
---|
712 | <ul> |
---|
713 | <li><code>void</code></li> |
---|
714 | </ul> |
---|
715 | </div> |
---|
716 | </div> |
---|
717 | </div> |
---|
718 | </td> |
---|
719 | <td class="msource">DragDropMgr</td> |
---|
720 | </tr> |
---|
721 | <tr class="method-row alt expandable"> |
---|
722 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
723 | <td class="sig"> |
---|
724 | <a id="Ext.dd.DragDropMgr-swapNode"></a> |
---|
725 | <b>swapNode</b>( <code>n1 the</code>, <code>n2 the</code> ) : void <div class="mdesc"> |
---|
726 | <div class="short"><static> Swap two nodes. In IE, we use the native method, for others we |
---|
727 | emulate the IE behavior</div> |
---|
728 | <div class="long"> |
---|
729 | <static> Swap two nodes. In IE, we use the native method, for others we |
---|
730 | emulate the IE behavior <div class="mdetail-params"> |
---|
731 | <strong>Parameters:</strong> |
---|
732 | <ul><li><code>the</code> : n1<div class="sub-desc">first node to swap</div></li><li><code>the</code> : n2<div class="sub-desc">other node to swap</div></li> </ul> |
---|
733 | <strong>Returns:</strong> |
---|
734 | <ul> |
---|
735 | <li><code>void</code></li> |
---|
736 | </ul> |
---|
737 | </div> |
---|
738 | </div> |
---|
739 | </div> |
---|
740 | </td> |
---|
741 | <td class="msource">DragDropMgr</td> |
---|
742 | </tr> |
---|
743 | <tr class="method-row expandable"> |
---|
744 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
745 | <td class="sig"> |
---|
746 | <a id="Ext.dd.DragDropMgr-unlock"></a> |
---|
747 | <b>unlock</b>() : void <div class="mdesc"> |
---|
748 | <div class="short"><static> Unlock all drag and drop functionality</div> |
---|
749 | <div class="long"> |
---|
750 | <static> Unlock all drag and drop functionality <div class="mdetail-params"> |
---|
751 | <strong>Parameters:</strong> |
---|
752 | <ul><li>None.</li> </ul> |
---|
753 | <strong>Returns:</strong> |
---|
754 | <ul> |
---|
755 | <li><code>void</code></li> |
---|
756 | </ul> |
---|
757 | </div> |
---|
758 | </div> |
---|
759 | </div> |
---|
760 | </td> |
---|
761 | <td class="msource">DragDropMgr</td> |
---|
762 | </tr> |
---|
763 | <tr class="method-row alt expandable"> |
---|
764 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
765 | <td class="sig"> |
---|
766 | <a id="Ext.dd.DragDropMgr-verifyEl"></a> |
---|
767 | <b>verifyEl</b>( <code>HTMLElement el</code> ) : boolean <div class="mdesc"> |
---|
768 | <div class="short"><static> This checks to make sure an element exists and is in the DOM. The |
---|
769 | main purpose is to handle cases whe...</div> |
---|
770 | <div class="long"> |
---|
771 | <static> This checks to make sure an element exists and is in the DOM. The |
---|
772 | main purpose is to handle cases where innerHTML is used to remove |
---|
773 | drag and drop objects from the DOM. IE provides an 'unspecified |
---|
774 | error' when trying to access the offsetParent of such an element <div class="mdetail-params"> |
---|
775 | <strong>Parameters:</strong> |
---|
776 | <ul><li><code>el</code> : HTMLElement<div class="sub-desc">the element to check</div></li> </ul> |
---|
777 | <strong>Returns:</strong> |
---|
778 | <ul> |
---|
779 | <li><code>boolean</code><div class="sub-desc">true if the element looks usable</div></li> |
---|
780 | </ul> |
---|
781 | </div> |
---|
782 | </div> |
---|
783 | </div> |
---|
784 | </td> |
---|
785 | <td class="msource">DragDropMgr</td> |
---|
786 | </tr> |
---|
787 | </table> |
---|
788 | <a id="Ext.dd.DragDropMgr-events"></a> |
---|
789 | <h2>Public Events</h2> |
---|
790 | <div class="no-members">This class has no public events.</div> |
---|
791 | </div> |
---|