Topic: DND custom action between 2 trees bug ?
Considering 2 trees. One without checkboxes and the other with checkboxes.
I want to copy node from the first tree to the second and tick the checkbox. Unfortunately when I try to
do it doesn't works ...
Seems that copy method returns always reference from the original tree...
I've setup the custom dnd action on the destination tree ...
Mif.Tree.implement({
dndCustomAction: function(current, target, where){
if(current.tree==target.tree){
current.tree.move(current, target, where);
}else{
var tree = current.tree.copy(current, target, where);
tree.getSelected().switch(true);
}
}
});
-----
tree1 = new Mif.Tree({
...
initialize: function(){
...
new Mif.Tree.Drag(this, {
...
tree2 = new Mif.Tree({
...
initialize: function(){
...
this.initCheckbox('deps');
new Mif.Tree.Drag(this, {
action:'dndCustomAction',
...