[CLOSED] Drag and drop from treepanel to treepanel in "copy" mode

  1. #1

    [CLOSED] Drag and drop from treepanel to treepanel in "copy" mode

    Hi,

    Is there a way to set the behavior of drag/drop between 2 treepanels so that the nodes are copied (including child nodes) rather than moved?

    Edit:

    I should add I'm using a "MultiSelectTreePanel", so I could be dragging a set of nodes.

    Unless theres an easier way, I think I need to clone the nodes and add them to the new treepanel, something like

                <Listeners>
                    <BeforeNodeDrop Fn="ScuControllers.handleNodeDrop"></BeforeNodeDrop>
                </Listeners>
    
    
        handleNodeDrop: function (node) {
            console.log(node);
            var clonedNodesArray = jQuery.extend({}, node.dropNode);
            node.dropNode = clonedNodesArray;
            return true;
        }
    Although at the moment I'm not having much joy.


    Thanks

    Matt
    Last edited by Daniil; Jul 18, 2011 at 2:56 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I think you need to override .completeDrop in the Ext.ux.MultiSelectTreeDropZone class.
  3. #3

Similar Threads

  1. Replies: 5
    Last Post: Jul 31, 2012, 2:36 PM
  2. [CLOSED] TreePanel : "invalid property id" error
    By coleg123 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 23, 2011, 9:47 PM
  3. Replies: 6
    Last Post: Nov 04, 2010, 10:14 AM
  4. Replies: 1
    Last Post: Nov 03, 2010, 7:31 PM
  5. Replies: 2
    Last Post: Jul 30, 2010, 12:37 AM

Posting Permissions