You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
146 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.data.JsonP.Ext_dd_DragZone({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.grid.GridDragZone","Ext.tree.TreeDragZone"],"extends":"Ext.dd.DragSource","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.dd.DragDrop' rel='Ext.dd.DragDrop' class='docClass'>Ext.dd.DragDrop</a><div class='subclass '><a href='#!/api/Ext.dd.DD' rel='Ext.dd.DD' class='docClass'>Ext.dd.DD</a><div class='subclass '><a href='#!/api/Ext.dd.DDProxy' rel='Ext.dd.DDProxy' class='docClass'>Ext.dd.DDProxy</a><div class='subclass '><a href='#!/api/Ext.dd.DragSource' rel='Ext.dd.DragSource' class='docClass'>Ext.dd.DragSource</a><div class='subclass '><strong>Ext.dd.DragZone</strong></div></div></div></div></div><h4>Subclasses</h4><div class='dependency'><a href='#!/api/Ext.grid.GridDragZone' rel='Ext.grid.GridDragZone' class='docClass'>Ext.grid.GridDragZone</a></div><div class='dependency'><a href='#!/api/Ext.tree.TreeDragZone' rel='Ext.tree.TreeDragZone' class='docClass'>Ext.tree.TreeDragZone</a></div><h4>Files</h4><div class='dependency'><a href='source/DragZone.html#Ext-dd-DragZone' target='_blank'>DragZone.js</a></div></pre><div class='doc-contents'><p>This class provides a container DD instance that allows dragging of multiple child source nodes.</p>\n\n\n<p>This class does not move the drag target nodes, but a proxy element which may contain\nany DOM structure you wish. The DOM element to show in the proxy is provided by either a\nprovided implementation of <a href=\"#!/api/Ext.dd.DragZone-method-getDragData\" rel=\"Ext.dd.DragZone-method-getDragData\" class=\"docClass\">getDragData</a>, or by registered draggables registered with <a href=\"#!/api/Ext.dd.Registry\" rel=\"Ext.dd.Registry\" class=\"docClass\">Ext.dd.Registry</a></p>\n\n\n<p>If you wish to provide draggability for an arbitrary number of DOM nodes, each of which represent some\napplication object (For example nodes in a <a href=\"#!/api/Ext.DataView\" rel=\"Ext.DataView\" class=\"docClass\">DataView</a>) then use of this class\nis the most efficient way to \"activate\" those nodes.</p>\n\n\n<p>By default, this class requires that draggable child nodes are registered with <a href=\"#!/api/Ext.dd.Registry\" rel=\"Ext.dd.Registry\" class=\"docClass\">Ext.dd.Registry</a>.\nHowever a simpler way to allow a DragZone to manage any number of draggable elements is to configure\nthe DragZone with an implementation of the <a href=\"#!/api/Ext.dd.DragZone-method-getDragData\" rel=\"Ext.dd.DragZone-method-getDragData\" class=\"docClass\">getDragData</a> method which interrogates the passed\nmouse event to see if it has taken place within an element, or class of elements. This is easily done\nby using the event's <a href=\"#!/api/Ext.EventObject-method-getTarget\" rel=\"Ext.EventObject-method-getTarget\" class=\"docClass\">getTarget</a> method to identify a node based on a\n<a href=\"#!/api/Ext.DomQuery\" rel=\"Ext.DomQuery\" class=\"docClass\">Ext.DomQuery</a> selector. For example, to make the nodes of a DataView draggable, use the following\ntechnique. Knowledge of the use of the DataView is required:</p>\n\n\n<pre><code>myDataView.on('render', function(v) {\n myDataView.dragZone = new <a href=\"#!/api/Ext.dd.DragZone\" rel=\"Ext.dd.DragZone\" class=\"docClass\">Ext.dd.DragZone</a>(v.getEl(), {\n\n// On receipt of a mousedown event, see if it is within a DataView node.\n// Return a drag data object if so.\n getDragData: function(e) {\n\n// Use the DataView's own itemSelector (a mandatory property) to\n// test if the mousedown is within one of the DataView's nodes.\n var sourceEl = e.getTarget(v.itemSelector, 10);\n\n// If the mousedown is within a DataView node, clone the node to produce\n// a ddel element for use by the drag proxy. Also add application data\n// to the returned data object.\n if (sourceEl) {\n d = sourceEl.cloneNode(true);\n d.id = <a hre