Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.tree.ViewDDPlugin.html
1 <!DOCTYPE html><html><head><title>Ext.tree.ViewDDPlugin | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.tree.ViewDDPlugin',
13         docClass: 'Ext.tree.ViewDDPlugin',
14         docReq: 'Ext.tree.ViewDDPlugin',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'TreeViewDragDrop.html#Ext-tree.ViewDDPlugin';
33     clsInfo = {"methods":["disable","enable"],"cfgs":["allowContainerDrop","allowParentInsert","appendOnly","ddGroup","dragGroup","dropGroup","enableDrag","enableDrop","expandDelay","nodeHighlightColor","nodeHighlightOnDrop","nodeHighlightOnRepair"],"properties":["destroy","init"],"events":["beforedrop","drop"],"subclasses":[]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin" target="_blank">Ext.tree.ViewDDPlugin</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><pre class="subclasses"><h4>Hierarchy</h4><div class="subclass f"><a href="Ext.AbstractPlugin.html" rel="Ext.AbstractPlugin" class="cls docClass">Ext.AbstractPlugin</a><div class="subclass"><strong>Ext.tree.ViewDDPlugin</strong></div></div></pre><p>This plugin provides drag and/or drop functionality for a TreeView.</p>
38
39
40 <p>It creates a specialized instance of <a href="Ext.dd.DragZone.html" rel="Ext.dd.DragZone" class="docClass">DragZone</a> which knows how to drag out of a <a href="Ext.tree.View.html" rel="Ext.tree.View" class="docClass">TreeView</a>
41 and loads the data object which is passed to a cooperating <a href="Ext.dd.DragZone.html" rel="Ext.dd.DragZone" class="docClass">DragZone</a>'s methods with the following properties:<ul>
42 <li>copy : Boolean
43  <div class="sub-desc">The value of the TreeView's <code>copy</code> property, or <code>true</code> if the TreeView was configured
44  with <code>allowCopy: true</code> <u>and</u> the control key was pressed when the drag operation was begun.</div></li>
45 <li>view : TreeView
46  <div class="sub-desc">The source TreeView from which the drag originated.</div></li>
47 <li>ddel : HtmlElement
48  <div class="sub-desc">The drag proxy element which moves with the mouse</div></li>
49 <li>item : HtmlElement
50  <div class="sub-desc">The TreeView node upon which the mousedown event was registered.</div></li>
51 <li>records : Array
52  <div class="sub-desc">An Array of <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a>s representing the selected data being dragged from the source TreeView.</div></li>
53 </ul></p>
54
55
56 <p>It also creates a specialized instance of <a href="Ext.dd.DropZone.html" rel="Ext.dd.DropZone" class="docClass">Ext.dd.DropZone</a> which cooperates with other DropZones which are members of the same
57 ddGroup which processes such data objects.</p>
58
59
60 <p>Adding this plugin to a view means that two new events may be fired from the client TreeView, <code><a href="Ext.tree.ViewDDPlugin.html#event-beforedrop" rel="Ext.tree.ViewDDPlugin#event-beforedrop" class="docClass">beforedrop</a></code> and
61 <code><a href="Ext.tree.ViewDDPlugin.html#event-drop" rel="Ext.tree.ViewDDPlugin#event-drop" class="docClass">drop</a></code></p>
62
63 <div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">Other Configs</h4><div id="config-allowContainerDrop" class="member f ni"><a href="Ext.tree.ViewDDPlugin.html#config-allowContainerDrop" rel="config-allowContainerDrop" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-allowContainerDrop" class="viewSource">view source</a></div><a name="allowContainerDrop"></a><a name="config-allowContainerDrop"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-allowContainerDrop" class="cls expand">allowContainerDrop</a><span> : String</span></div><div class="description"><div class="short"><p>True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)</p>
64 </div><div class="long"><p>True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)</p>
65 </div></div></div><div id="config-allowParentInsert" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-allowParentInsert" rel="config-allowParentInsert" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-allowParentInsert" class="viewSource">view source</a></div><a name="allowParentInsert"></a><a name="config-allowParentInsert"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-allowParentInsert" class="cls expand">allowParentInsert</a><span> : Boolean</span></div><div class="description"><div class="short">Allow inserting a dragged node between an expanded parent node and its first child that will become a
66 sibling of the ...</div><div class="long"><p>Allow inserting a dragged node between an expanded parent node and its first child that will become a
67 sibling of the parent when dropped (defaults to false)</p>
68 </div></div></div><div id="config-appendOnly" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-appendOnly" rel="config-appendOnly" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-appendOnly" class="viewSource">view source</a></div><a name="appendOnly"></a><a name="config-appendOnly"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-appendOnly" class="cls expand">appendOnly</a><span> : String</span></div><div class="description"><div class="short"><p>True if the tree should only allow append drops (use for trees which are sorted, defaults to false)</p>
69 </div><div class="long"><p>True if the tree should only allow append drops (use for trees which are sorted, defaults to false)</p>
70 </div></div></div><div id="config-ddGroup" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-ddGroup" rel="config-ddGroup" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-ddGroup" class="viewSource">view source</a></div><a name="ddGroup"></a><a name="config-ddGroup"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-ddGroup" class="cls expand">ddGroup</a><span> : String</span></div><div class="description"><div class="short">A named drag drop group to which this object belongs.  If a group is specified, then both the DragZones and DropZone
71 ...</div><div class="long"><p>A named drag drop group to which this object belongs.  If a group is specified, then both the DragZones and DropZone
72 used by this plugin will only interact with other drag drop objects in the same group (defaults to 'TreeDD').</p>
73 </div></div></div><div id="config-dragGroup" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-dragGroup" rel="config-dragGroup" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-dragGroup" class="viewSource">view source</a></div><a name="dragGroup"></a><a name="config-dragGroup"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-dragGroup" class="cls expand">dragGroup</a><span> : String</span></div><div class="description"><div class="short">The ddGroup to which the DragZone will belong.
74
75
76 This defines which other DropZones the DragZone will interact with. ...</div><div class="long"><p>The ddGroup to which the DragZone will belong.</p>
77
78
79 <p>This defines which other DropZones the DragZone will interact with. Drag/DropZones only interact with other Drag/DropZones
80 which are members of the same ddGroup.</p>
81
82 </div></div></div><div id="config-dropGroup" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-dropGroup" rel="config-dropGroup" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-dropGroup" class="viewSource">view source</a></div><a name="dropGroup"></a><a name="config-dropGroup"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-dropGroup" class="cls expand">dropGroup</a><span> : String</span></div><div class="description"><div class="short">The ddGroup to which the DropZone will belong.
83
84
85 This defines which other DragZones the DropZone will interact with. ...</div><div class="long"><p>The ddGroup to which the DropZone will belong.</p>
86
87
88 <p>This defines which other DragZones the DropZone will interact with. Drag/DropZones only interact with other Drag/DropZones
89 which are members of the same ddGroup.</p>
90
91 </div></div></div><div id="config-enableDrag" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-enableDrag" rel="config-enableDrag" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-enableDrag" class="viewSource">view source</a></div><a name="enableDrag"></a><a name="config-enableDrag"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-enableDrag" class="cls expand">enableDrag</a><span> : Boolean</span></div><div class="description"><div class="short"><p>Defaults to <code>true</code></p>
92
93
94 <p>Set to <code>false</code> to disallow dragging items from the View </p>
95
96 </div><div class="long"><p>Defaults to <code>true</code></p>
97
98
99 <p>Set to <code>false</code> to disallow dragging items from the View </p>
100
101 </div></div></div><div id="config-enableDrop" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-enableDrop" rel="config-enableDrop" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-enableDrop" class="viewSource">view source</a></div><a name="enableDrop"></a><a name="config-enableDrop"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-enableDrop" class="cls expand">enableDrop</a><span> : Boolean</span></div><div class="description"><div class="short"><p>Defaults to <code>true</code></p>
102
103
104 <p>Set to <code>false</code> to disallow the View from accepting drop gestures</p>
105
106 </div><div class="long"><p>Defaults to <code>true</code></p>
107
108
109 <p>Set to <code>false</code> to disallow the View from accepting drop gestures</p>
110
111 </div></div></div><div id="config-expandDelay" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-expandDelay" rel="config-expandDelay" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-expandDelay" class="viewSource">view source</a></div><a name="expandDelay"></a><a name="config-expandDelay"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-expandDelay" class="cls expand">expandDelay</a><span> : String</span></div><div class="description"><div class="short">The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node
112 over the target...</div><div class="long"><p>The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node
113 over the target (defaults to 1000)</p>
114 </div></div></div><div id="config-nodeHighlightColor" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-nodeHighlightColor" rel="config-nodeHighlightColor" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-nodeHighlightColor" class="viewSource">view source</a></div><a name="nodeHighlightColor"></a><a name="config-nodeHighlightColor"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-nodeHighlightColor" class="cls expand">nodeHighlightColor</a><span> : String</span></div><div class="description"><div class="short">The color to use when visually highlighting the dragged
115 or dropped node (defaults to 'c3daf9' - light blue). The colo...</div><div class="long"><p>The color to use when visually highlighting the dragged
116 or dropped node (defaults to 'c3daf9' - light blue). The color must be a 6 digit hex value, without
117 a preceding '#'. See also <a href="Ext.tree.ViewDDPlugin.html#nodeHighlightOnDrop" rel="Ext.tree.ViewDDPlugin#nodeHighlightOnDrop" class="docClass">nodeHighlightOnDrop</a> and <a href="Ext.tree.ViewDDPlugin.html#nodeHighlightOnRepair" rel="Ext.tree.ViewDDPlugin#nodeHighlightOnRepair" class="docClass">nodeHighlightOnRepair</a>.</p>
118 </div></div></div><div id="config-nodeHighlightOnDrop" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-nodeHighlightOnDrop" rel="config-nodeHighlightOnDrop" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-nodeHighlightOnDrop" class="viewSource">view source</a></div><a name="nodeHighlightOnDrop"></a><a name="config-nodeHighlightOnDrop"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-nodeHighlightOnDrop" class="cls expand">nodeHighlightOnDrop</a><span> : Boolean</span></div><div class="description"><div class="short">Whether or not to highlight any nodes after they are
119 successfully dropped on their target. Defaults to the value of E...</div><div class="long"><p>Whether or not to highlight any nodes after they are
120 successfully dropped on their target. Defaults to the value of <code>Ext.enableFx</code>.
121 See also <a href="Ext.tree.ViewDDPlugin.html#nodeHighlightColor" rel="Ext.tree.ViewDDPlugin#nodeHighlightColor" class="docClass">nodeHighlightColor</a> and <a href="Ext.tree.ViewDDPlugin.html#nodeHighlightOnRepair" rel="Ext.tree.ViewDDPlugin#nodeHighlightOnRepair" class="docClass">nodeHighlightOnRepair</a>.</p>
122 </div></div></div><div id="config-nodeHighlightOnRepair" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#config-nodeHighlightOnRepair" rel="config-nodeHighlightOnRepair" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-cfg-nodeHighlightOnRepair" class="viewSource">view source</a></div><a name="nodeHighlightOnRepair"></a><a name="config-nodeHighlightOnRepair"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="config-nodeHighlightOnRepair" class="cls expand">nodeHighlightOnRepair</a><span> : Boolean</span></div><div class="description"><div class="short">Whether or not to highlight any nodes after they are
123 repaired from an unsuccessful drag/drop. Defaults to the value o...</div><div class="long"><p>Whether or not to highlight any nodes after they are
124 repaired from an unsuccessful drag/drop. Defaults to the value of <code>Ext.enableFx</code>.
125 See also <a href="Ext.tree.ViewDDPlugin.html#nodeHighlightColor" rel="Ext.tree.ViewDDPlugin#nodeHighlightColor" class="docClass">nodeHighlightColor</a> and <a href="Ext.tree.ViewDDPlugin.html#nodeHighlightOnDrop" rel="Ext.tree.ViewDDPlugin#nodeHighlightOnDrop" class="docClass">nodeHighlightOnDrop</a>.</p>
126 </div></div></div></div><div class="m-properties"><a name="properties"></a><div class="definedBy">Defined By</div><h3 class="prp p">Properties</h3><div id="property-destroy" class="member f inherited"><a href="Ext.tree.ViewDDPlugin.html#property-destroy" rel="property-destroy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.AbstractPlugin.html" class="definedIn docClass">Ext.AbstractPlugin</a><br/><a href="../source/AbstractPlugin.html#Ext-AbstractPlugin-property-destroy" class="viewSource">view source</a></div><a name="destroy"></a><a name="property-destroy"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="property-destroy" class="cls expand">destroy</a><span> : Object</span></div><div class="description"><div class="short">The destroy method is invoked by the owning Component at the time the Component is being destroyed.
127 Use this method t...</div><div class="long"><p>The destroy method is invoked by the owning Component at the time the Component is being destroyed.
128 Use this method to clean up an resources.</p>
129 </div></div></div><div id="property-init" class="member inherited"><a href="Ext.tree.ViewDDPlugin.html#property-init" rel="property-init" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.AbstractPlugin.html" class="definedIn docClass">Ext.AbstractPlugin</a><br/><a href="../source/AbstractPlugin.html#Ext-AbstractPlugin-property-init" class="viewSource">view source</a></div><a name="init"></a><a name="property-init"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="property-init" class="cls expand">init</a><span> : Object</span></div><div class="description"><div class="short"><p>The init method is invoked after initComponent has been run for the
130 component which we are injecting the plugin into.</p>
131 </div><div class="long"><p>The init method is invoked after initComponent has been run for the
132 component which we are injecting the plugin into.</p>
133 </div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-disable" class="member f inherited"><a href="Ext.tree.ViewDDPlugin.html#method-disable" rel="method-disable" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.AbstractPlugin.html" class="definedIn docClass">Ext.AbstractPlugin</a><br/><a href="../source/AbstractPlugin.html#Ext-AbstractPlugin-method-disable" class="viewSource">view source</a></div><a name="disable"></a><a name="method-disable"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="method-disable" class="cls expand">disable</a> : void</div><div class="description"><div class="short"><p>Disable the plugin and set the disabled flag to true.</p>
134 </div><div class="long"><p>Disable the plugin and set the disabled flag to true.</p>
135 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
136 </li></ul></div></div></div><div id="method-enable" class="member inherited"><a href="Ext.tree.ViewDDPlugin.html#method-enable" rel="method-enable" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.AbstractPlugin.html" class="definedIn docClass">Ext.AbstractPlugin</a><br/><a href="../source/AbstractPlugin.html#Ext-AbstractPlugin-method-enable" class="viewSource">view source</a></div><a name="enable"></a><a name="method-enable"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="method-enable" class="cls expand">enable</a> : void</div><div class="description"><div class="short"><p>Enable the plugin and set the disabled flag to false.</p>
137 </div><div class="long"><p>Enable the plugin and set the disabled flag to false.</p>
138 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
139 </li></ul></div></div></div></div><div class="m-events"><a name="events"></a><div class="definedBy">Defined By</div><h3 class="evt p">Events</h3><div id="event-beforedrop" class="member f ni"><a href="Ext.tree.ViewDDPlugin.html#event-beforedrop" rel="event-beforedrop" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-event-beforedrop" class="viewSource">view source</a></div><a name="beforedrop"></a><a name="event-beforedrop"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="event-beforedrop" class="cls expand">beforedrop</a>(
140 <span class="pre">HtmlElement node, Object data, Ext.data.Model overModel, String dropPosition, Function dropFunction</span>)
141 </div><div class="description"><div class="short">This event is fired through the TreeView. Add listeners to the TreeView object
142
143
144 Fired when a drop gesture has been t...</div><div class="long"><p><b>This event is fired through the TreeView. Add listeners to the TreeView object</b></p>
145
146
147 <p>Fired when a drop gesture has been triggered by a mouseup event in a valid drop position in the TreeView.
148
149 <h3 class="pa">Parameters</h3><ul><li><span class="pre">node</span> : HtmlElement<div class="sub-desc"><p>The TreeView node <b>if any</b> over which the mouse was positioned.</p></p>
150
151 <p>Returning <code>false</code> to this event signals that the drop gesture was invalid, and if the drag proxy
152 will animate back to the point from which the drag began.</p>
153
154
155 <p>Returning <code>0</code> To this event signals that the data transfer operation should not take place, but
156 that the gesture was valid, and that the repair operation should not take place.</p>
157
158
159 <p>Any other return value continues with the data transfer operation.</p>
160
161 </div></li><li><span class="pre">data</span> : Object<div class="sub-desc"><p>The data object gathered at mousedown time by the cooperating <a href="Ext.dd.DragZone.html" rel="Ext.dd.DragZone" class="docClass">DragZone</a>'s
162 <a href="Ext.dd.DragZone.html#getDragData" rel="Ext.dd.DragZone#getDragData" class="docClass">getDragData</a> method it contains the following properties:<ul>
163 <li>copy : Boolean
164  <div class="sub-desc">The value of the TreeView's <code>copy</code> property, or <code>true</code> if the TreeView was configured
165  with <code>allowCopy: true</code> and the control key was pressed when the drag operation was begun</div></li>
166 <li>view : TreeView
167  <div class="sub-desc">The source TreeView from which the drag originated.</div></li>
168 <li>ddel : HtmlElement
169  <div class="sub-desc">The drag proxy element which moves with the mouse</div></li>
170 <li>item : HtmlElement
171  <div class="sub-desc">The TreeView node upon which the mousedown event was registered.</div></li>
172 <li>records : Array
173  <div class="sub-desc">An Array of <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a>s representing the selected data being dragged from the source TreeView.</div></li>
174 </ul></p>
175 </div></li><li><span class="pre">overModel</span> : Ext.data.Model<div class="sub-desc"><p>The Model over which the drop gesture took place.</p>
176 </div></li><li><span class="pre">dropPosition</span> : String<div class="sub-desc"><p><code>"before"</code>, <code>"after"</code> or <code>"append"</code> depending on whether the mouse is above or below the midline of the node,
177 or the node is a branch node which accepts new child nodes.</p>
178 </div></li><li><span class="pre">dropFunction</span> : Function<div class="sub-desc"><p>A function to call to complete the data transfer operation and either move or copy Model instances from the source
179 View's Store to the destination View's Store.</p>
180
181
182 <p>This is useful when you want to perform some kind of asynchronous processing before confirming
183 the drop, such as an <a href="Ext.window.MessageBox.html#confirm" rel="Ext.window.MessageBox#confirm" class="docClass">confirm</a> call, or an Ajax request.</p>
184
185
186 <p>Return <code>0</code> from this event handler, and call the <code>dropFunction</code> at any time to perform the data transfer.</p>
187
188 </div></li></ul></div></div></div><div id="event-drop" class="member ni"><a href="Ext.tree.ViewDDPlugin.html#event-drop" rel="event-drop" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.tree.ViewDDPlugin.html" class="definedIn docClass">Ext.tree.ViewDDPlugin</a><br/><a href="../source/TreeViewDragDrop.html#Ext-tree.ViewDDPlugin-event-drop" class="viewSource">view source</a></div><a name="drop"></a><a name="event-drop"></a><a href="Ext.tree.ViewDDPlugin.html#" rel="event-drop" class="cls expand">drop</a>(
189 <span class="pre">HtmlElement node, Object data, Ext.data.Model overModel, String dropPosition</span>)
190 </div><div class="description"><div class="short">This event is fired through the TreeView. Add listeners to the TreeView object
191 Fired when a drop operation has been c...</div><div class="long"><p><b>This event is fired through the TreeView. Add listeners to the TreeView object</b>
192 Fired when a drop operation has been completed and the data has been moved or copied.</p>
193 <h3 class="pa">Parameters</h3><ul><li><span class="pre">node</span> : HtmlElement<div class="sub-desc"><p>The TreeView node <b>if any</b> over which the mouse was positioned.</p>
194 </div></li><li><span class="pre">data</span> : Object<div class="sub-desc"><p>The data object gathered at mousedown time by the cooperating <a href="Ext.dd.DragZone.html" rel="Ext.dd.DragZone" class="docClass">DragZone</a>'s
195 <a href="Ext.dd.DragZone.html#getDragData" rel="Ext.dd.DragZone#getDragData" class="docClass">getDragData</a> method it contains the following properties:<ul>
196 <li>copy : Boolean
197  <div class="sub-desc">The value of the TreeView's <code>copy</code> property, or <code>true</code> if the TreeView was configured
198  with <code>allowCopy: true</code> and the control key was pressed when the drag operation was begun</div></li>
199 <li>view : TreeView
200  <div class="sub-desc">The source TreeView from which the drag originated.</div></li>
201 <li>ddel : HtmlElement
202  <div class="sub-desc">The drag proxy element which moves with the mouse</div></li>
203 <li>item : HtmlElement
204  <div class="sub-desc">The TreeView node upon which the mousedown event was registered.</div></li>
205 <li>records : Array
206  <div class="sub-desc">An Array of <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a>s representing the selected data being dragged from the source TreeView.</div></li>
207 </ul></p>
208 </div></li><li><span class="pre">overModel</span> : Ext.data.Model<div class="sub-desc"><p>The Model over which the drop gesture took place.</p>
209 </div></li><li><span class="pre">dropPosition</span> : String<div class="sub-desc"><p><code>"before"</code>, <code>"after"</code> or <code>"append"</code> depending on whether the mouse is above or below the midline of the node,
210 or the node is a branch node which accepts new child nodes.</p>
211 </div></li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>