javascript - Detect target treenode when dragging items to the TreePanel instance -
I have gridpanel and trippanel examples. Elements of gridpanel can be drawn in the paperpanel but I did not know that these trees How nodes get these dragged items.
I start Paid Panel DD with the following code (Extractory method of the class obtained from the tree panel):
initDD: function () {var treePanelDropTargetEl = This.getEl (); Var treePanelDropTarget = new Ext.dd.DropTarget (tree pedal-droop-target-AL, {ddGroup: 'ddgroup-1', notified: function (ddSource, e, data) {// do something with data, here's the goal tree node Need to know the return;}}); }
How can I find out which item is dragged into the "Notified" handler, which can take e.getTarget () and calculate the node, but I do not like that method.
If you use TreeDropZone
(instead of DropTarget
) You will have more tree-specific options and events like onNodeDrop
. Note that there are several ways to do DND Ext JS.
Comments
Post a Comment