View Full Version : [solved?]Tell if tree node dropped on or in folder

24 Aug 2009, 6:32 AM
Not sure if this is the best way to do it, but I needed to know if a tree node was being dropped inside of a folder or actually on the folder it's self...

dragdrop : function( cmp, node, dd, e ){

var dropOnFolder = false;

try {
if (dd.dragOverData.target.lastChild.id == node.id) {
dropOnFolder = true;
} catch(e){}


if there is a better way please do tell :)


24 Aug 2009, 7:55 AM
how about posting your solution? It would help other people. ;)

24 Aug 2009, 11:39 AM
that actually is the solution! But I just found a problem - if the node is not expanded when you drop on it, you get a false....

24 Aug 2009, 2:00 PM
oks this is what we are looking for:

dragdrop : function( cmp, node, dd, e ){


dd.dragOverData.point - this gives above, below or append - append tells you that it is being dropped on a folder.