2 |
aperonnet |
1 |
<div class="body-wrap">
|
|
|
2 |
<div class="top-tools">
|
|
|
3 |
<a class="inner-link" href="#Ext.dd.Registry-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
|
|
|
4 |
<a class="inner-link" href="#Ext.dd.Registry-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
|
|
|
5 |
<a class="inner-link" href="#Ext.dd.Registry-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
|
|
|
6 |
<a class="bookmark" href="../docs/?class=Ext.dd.Registry"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
|
|
|
7 |
</div>
|
|
|
8 |
<h1>Class Ext.dd.Registry</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="../source/dd/Registry.js" target="_blank">Registry.js</a></td></tr>
|
|
|
12 |
<tr><td class="label">Class:</td><td class="hd-info">Registry</td></tr>
|
|
|
13 |
<tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
|
|
|
14 |
</table>
|
|
|
15 |
<div class="description">
|
|
|
16 |
Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either
|
|
|
17 |
directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.<br><br><i>This class is a singleton and cannot be created directly.</i> </div>
|
|
|
18 |
|
|
|
19 |
<div class="hr"></div>
|
|
|
20 |
<a id="Ext.dd.Registry-props"></a>
|
|
|
21 |
<h2>Public Properties</h2>
|
|
|
22 |
<div class="no-members">This class has no public properties.</div> <a id="Ext.dd.Registry-methods"></a>
|
|
|
23 |
<h2>Public Methods</h2>
|
|
|
24 |
<table cellspacing="0" class="member-table">
|
|
|
25 |
<tr>
|
|
|
26 |
<th class="sig-header" colspan="2">Method</th>
|
|
|
27 |
<th class="msource-header">Defined By</th>
|
|
|
28 |
</tr>
|
|
|
29 |
<tr class="method-row expandable">
|
|
|
30 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
31 |
<td class="sig">
|
|
|
32 |
<a id="Ext.dd.Registry-getHandle"></a>
|
|
|
33 |
<b>getHandle</b>( <code>String/HTMLElement id</code> ) : Object <div class="mdesc">
|
|
|
34 |
<div class="short">Returns the handle registered for a DOM Node by id</div>
|
|
|
35 |
<div class="long">
|
|
|
36 |
Returns the handle registered for a DOM Node by id <div class="mdetail-params">
|
|
|
37 |
<strong>Parameters:</strong>
|
|
|
38 |
<ul><li><code>id</code> : String/HTMLElement<div class="sub-desc">The DOM node or id to look up</div></li> </ul>
|
|
|
39 |
<strong>Returns:</strong>
|
|
|
40 |
<ul>
|
|
|
41 |
<li><code>Object</code><div class="sub-desc">handle The custom handle data</div></li>
|
|
|
42 |
</ul>
|
|
|
43 |
</div>
|
|
|
44 |
</div>
|
|
|
45 |
</div>
|
|
|
46 |
</td>
|
|
|
47 |
<td class="msource">Registry</td>
|
|
|
48 |
</tr>
|
|
|
49 |
<tr class="method-row alt expandable">
|
|
|
50 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
51 |
<td class="sig">
|
|
|
52 |
<a id="Ext.dd.Registry-getHandleFromEvent"></a>
|
|
|
53 |
<b>getHandleFromEvent</b>( <code>Event e</code> ) : Object <div class="mdesc">
|
|
|
54 |
<div class="short">Returns the handle that is registered for the DOM node that is the target of the event</div>
|
|
|
55 |
<div class="long">
|
|
|
56 |
Returns the handle that is registered for the DOM node that is the target of the event <div class="mdetail-params">
|
|
|
57 |
<strong>Parameters:</strong>
|
|
|
58 |
<ul><li><code>e</code> : Event<div class="sub-desc">The event</div></li> </ul>
|
|
|
59 |
<strong>Returns:</strong>
|
|
|
60 |
<ul>
|
|
|
61 |
<li><code>Object</code><div class="sub-desc">handle The custom handle data</div></li>
|
|
|
62 |
</ul>
|
|
|
63 |
</div>
|
|
|
64 |
</div>
|
|
|
65 |
</div>
|
|
|
66 |
</td>
|
|
|
67 |
<td class="msource">Registry</td>
|
|
|
68 |
</tr>
|
|
|
69 |
<tr class="method-row expandable">
|
|
|
70 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
71 |
<td class="sig">
|
|
|
72 |
<a id="Ext.dd.Registry-getTarget"></a>
|
|
|
73 |
<b>getTarget</b>( <code>String/HTMLElement id</code> ) : Object <div class="mdesc">
|
|
|
74 |
<div class="short">Returns a custom data object that is registered for a DOM node by id</div>
|
|
|
75 |
<div class="long">
|
|
|
76 |
Returns a custom data object that is registered for a DOM node by id <div class="mdetail-params">
|
|
|
77 |
<strong>Parameters:</strong>
|
|
|
78 |
<ul><li><code>id</code> : String/HTMLElement<div class="sub-desc">The DOM node or id to look up</div></li> </ul>
|
|
|
79 |
<strong>Returns:</strong>
|
|
|
80 |
<ul>
|
|
|
81 |
<li><code>Object</code><div class="sub-desc">data The custom data</div></li>
|
|
|
82 |
</ul>
|
|
|
83 |
</div>
|
|
|
84 |
</div>
|
|
|
85 |
</div>
|
|
|
86 |
</td>
|
|
|
87 |
<td class="msource">Registry</td>
|
|
|
88 |
</tr>
|
|
|
89 |
<tr class="method-row alt expandable">
|
|
|
90 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
91 |
<td class="sig">
|
|
|
92 |
<a id="Ext.dd.Registry-getTargetFromEvent"></a>
|
|
|
93 |
<b>getTargetFromEvent</b>( <code>Event e</code> ) : Object <div class="mdesc">
|
|
|
94 |
<div class="short">Returns a custom data object that is registered for the DOM node that is the target of the event</div>
|
|
|
95 |
<div class="long">
|
|
|
96 |
Returns a custom data object that is registered for the DOM node that is the target of the event <div class="mdetail-params">
|
|
|
97 |
<strong>Parameters:</strong>
|
|
|
98 |
<ul><li><code>e</code> : Event<div class="sub-desc">The event</div></li> </ul>
|
|
|
99 |
<strong>Returns:</strong>
|
|
|
100 |
<ul>
|
|
|
101 |
<li><code>Object</code><div class="sub-desc">data The custom data</div></li>
|
|
|
102 |
</ul>
|
|
|
103 |
</div>
|
|
|
104 |
</div>
|
|
|
105 |
</div>
|
|
|
106 |
</td>
|
|
|
107 |
<td class="msource">Registry</td>
|
|
|
108 |
</tr>
|
|
|
109 |
<tr class="method-row expandable">
|
|
|
110 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
111 |
<td class="sig">
|
|
|
112 |
<a id="Ext.dd.Registry-register"></a>
|
|
|
113 |
<b>register</b>( <code>String/HTMLElement) element</code>, <span class="optional" title="Optional">[<code>Object data</code>]</span> ) : void <div class="mdesc">
|
|
|
114 |
<div class="short">Resgister a drag drop element</div>
|
|
|
115 |
<div class="long">
|
|
|
116 |
Resgister a drag drop element <div class="mdetail-params">
|
|
|
117 |
<strong>Parameters:</strong>
|
|
|
118 |
<ul><li><code>element</code> : String/HTMLElement)<div class="sub-desc">The id or DOM node to register</div></li><li><code>data</code> : Object<div class="sub-desc">(optional) An custom data object that will be passed between the elements that are involved
|
|
|
119 |
in drag drop operations. You can populate this object with any arbitrary properties that your own code
|
|
|
120 |
knows how to interpret, plus there are some specific properties known to the Registry that should be
|
|
|
121 |
populated in the data object (if applicable):
|
|
|
122 |
<pre>Value Description<br />
|
|
|
123 |
--------- ------------------------------------------<br />
|
|
|
124 |
handles Array of DOM nodes that trigger dragging<br />
|
|
|
125 |
for the element being registered<br />
|
|
|
126 |
isHandle True if the element passed in triggers<br />
|
|
|
127 |
dragging itself, else false</pre></div></li> </ul>
|
|
|
128 |
<strong>Returns:</strong>
|
|
|
129 |
<ul>
|
|
|
130 |
<li><code>void</code></li>
|
|
|
131 |
</ul>
|
|
|
132 |
</div>
|
|
|
133 |
</div>
|
|
|
134 |
</div>
|
|
|
135 |
</td>
|
|
|
136 |
<td class="msource">Registry</td>
|
|
|
137 |
</tr>
|
|
|
138 |
<tr class="method-row alt expandable">
|
|
|
139 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
140 |
<td class="sig">
|
|
|
141 |
<a id="Ext.dd.Registry-unregister"></a>
|
|
|
142 |
<b>unregister</b>( <code>String/HTMLElement) element</code> ) : void <div class="mdesc">
|
|
|
143 |
<div class="short">Unregister a drag drop element</div>
|
|
|
144 |
<div class="long">
|
|
|
145 |
Unregister a drag drop element <div class="mdetail-params">
|
|
|
146 |
<strong>Parameters:</strong>
|
|
|
147 |
<ul><li><code>element</code> : String/HTMLElement)<div class="sub-desc">The id or DOM node to unregister</div></li> </ul>
|
|
|
148 |
<strong>Returns:</strong>
|
|
|
149 |
<ul>
|
|
|
150 |
<li><code>void</code></li>
|
|
|
151 |
</ul>
|
|
|
152 |
</div>
|
|
|
153 |
</div>
|
|
|
154 |
</div>
|
|
|
155 |
</td>
|
|
|
156 |
<td class="msource">Registry</td>
|
|
|
157 |
</tr>
|
|
|
158 |
</table>
|
|
|
159 |
<a id="Ext.dd.Registry-events"></a>
|
|
|
160 |
<h2>Public Events</h2>
|
|
|
161 |
<div class="no-members">This class has no public events.</div>
|
|
|
162 |
</div>
|