Ok -- thanks that was one thing.
The second thing that needed changing is the function needs to be applied to the other tree
Code:
myfavreport.on('beforenodedrop', function(e){
var n = e.dropNode; // the node that was dropped
var copy = new Ext.tree.TreeNode( // copy it
Ext.apply({}, n.attributes)
);
e.dropNode = copy; // assign the copy as the new dropNode
});
below is a trick to prvent duplicating nodes dragged from inside the tree. This allows user sorting but prevents making additional copies
Code:
myfavreport.on('beforenodedrop', function(e){
var n = e.dropNode; // the node that was dropped
if (e.source.el !=this.el) {
var copy = new Ext.tree.TreeNode( // copy it
Ext.apply({}, n.attributes)
);
e.dropNode = copy; // assign the copy as the new dropNode
}
});