Ext.dd.Registry.html
8.78 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<div class="body-wrap">
<div class="top-tools">
<a class="inner-link" href="#Ext.dd.Registry-props"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-prop">Properties</a>
<a class="inner-link" href="#Ext.dd.Registry-methods"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-method">Methods</a>
<a class="inner-link" href="#Ext.dd.Registry-events"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-event">Events</a>
<a class="bookmark" href="../docs/?class=Ext.dd.Registry"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-fav">Direct Link</a>
</div>
<h1>Class Ext.dd.Registry</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td class="hd-info">Ext.dd</td></tr>
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/dd/Registry_wev8.js" target="_blank">Registry_wev8.js</a></td></tr>
<tr><td class="label">Class:</td><td class="hd-info">Registry</td></tr>
<tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
</table>
<div class="description">
Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either
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>
<div class="hr"></div>
<a id="Ext.dd.Registry-props"></a>
<h2>Public Properties</h2>
<div class="no-members">This class has no public properties.</div> <a id="Ext.dd.Registry-methods"></a>
<h2>Public Methods</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Method</th>
<th class="msource-header">Defined By</th>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.Registry-getHandle"></a>
<b>getHandle</b>( <code>String/HTMLElement id</code> ) : Object <div class="mdesc">
<div class="short">Returns the handle registered for a DOM Node by id</div>
<div class="long">
Returns the handle registered for a DOM Node by id <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>id</code> : String/HTMLElement<div class="sub-desc">The DOM node or id to look up</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">handle The custom handle data</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Registry</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.Registry-getHandleFromEvent"></a>
<b>getHandleFromEvent</b>( <code>Event e</code> ) : Object <div class="mdesc">
<div class="short">Returns the handle that is registered for the DOM node that is the target of the event</div>
<div class="long">
Returns the handle that is registered for the DOM node that is the target of the event <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>e</code> : Event<div class="sub-desc">The event</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">handle The custom handle data</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Registry</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.Registry-getTarget"></a>
<b>getTarget</b>( <code>String/HTMLElement id</code> ) : Object <div class="mdesc">
<div class="short">Returns a custom data object that is registered for a DOM node by id</div>
<div class="long">
Returns a custom data object that is registered for a DOM node by id <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>id</code> : String/HTMLElement<div class="sub-desc">The DOM node or id to look up</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">data The custom data</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Registry</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.Registry-getTargetFromEvent"></a>
<b>getTargetFromEvent</b>( <code>Event e</code> ) : Object <div class="mdesc">
<div class="short">Returns a custom data object that is registered for the DOM node that is the target of the event</div>
<div class="long">
Returns a custom data object that is registered for the DOM node that is the target of the event <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>e</code> : Event<div class="sub-desc">The event</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">data The custom data</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Registry</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.Registry-register"></a>
<b>register</b>( <code>String/HTMLElement) element</code>, <span class="optional" title="Optional">[<code>Object data</code>]</span> ) : void <div class="mdesc">
<div class="short">Resgister a drag drop element</div>
<div class="long">
Resgister a drag drop element <div class="mdetail-params">
<strong>Parameters:</strong>
<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
in drag drop operations. You can populate this object with any arbitrary properties that your own code
knows how to interpret, plus there are some specific properties known to the Registry that should be
populated in the data object (if applicable):
<pre>Value Description<br />
--------- ------------------------------------------<br />
handles Array of DOM nodes that trigger dragging<br />
for the element being registered<br />
isHandle True if the element passed in triggers<br />
dragging itself, else false</pre></div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Registry</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.Registry-unregister"></a>
<b>unregister</b>( <code>String/HTMLElement) element</code> ) : void <div class="mdesc">
<div class="short">Unregister a drag drop element</div>
<div class="long">
Unregister a drag drop element <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>element</code> : String/HTMLElement)<div class="sub-desc">The id or DOM node to unregister</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Registry</td>
</tr>
</table>
<a id="Ext.dd.Registry-events"></a>
<h2>Public Events</h2>
<div class="no-members">This class has no public events.</div>
</div>