digitalkaoz
27 Sep 2007, 9:29 AM
he guys, i am lookin for a solution to prevent a treenode being a droptarget for a group of specific treenodes from the same tree.
imagine following:
nodes of level 1 are droptargets for level 2 nodes only!
nodes of level 2 are droptargets for level 3 nodes only!
and so on if you will ;)
i've search the documentation, but didn't found a solution.
but i think it must have something todo with the attribute "ddGroup"
is it implemented?
notes:
i am loading the tree structure with the treeloader...
maybe someone could give me a hint.
thanks guys
digitalkaoz
YEAH solved :D
tree.on("nodedragover",function(cfg){
var s = cfg["dropNode"].getDepth();
var d = cfg["target"].getDepth();
if(s == d) //nodes of the same depth should be reorderable
return true;
else if(d != s-1) //prevent moving over more then one level
return false;
});
imagine following:
nodes of level 1 are droptargets for level 2 nodes only!
nodes of level 2 are droptargets for level 3 nodes only!
and so on if you will ;)
i've search the documentation, but didn't found a solution.
but i think it must have something todo with the attribute "ddGroup"
is it implemented?
notes:
i am loading the tree structure with the treeloader...
maybe someone could give me a hint.
thanks guys
digitalkaoz
YEAH solved :D
tree.on("nodedragover",function(cfg){
var s = cfg["dropNode"].getDepth();
var d = cfg["target"].getDepth();
if(s == d) //nodes of the same depth should be reorderable
return true;
else if(d != s-1) //prevent moving over more then one level
return false;
});