View Full Version : [Solved 3.0.0]Drop treenodes onto "leaf" nodes in the same tree

13 Sep 2009, 9:15 AM
I'm loading a tree with a single call, similar to how is described here: http://www.extjs.com/forum/showthread.php?p=294798

I have set up a TreePanel with "enableDD : true", which allows me to drag and drop nodes around. That works well, as expected.

I would like to be able to drop any node on any other node, even if the target node is a leaf. I notice that if the node is not a leaf, the dragged image changes to a plus and the target node is "highlighted". I can capture the drop onto a leaf node and short of reloading the tree every time a node is dropped to show the dropped node as a child of the target is there a specific config option / override I should apply to allow leaf nodes to behave exactly like nodes that already have children when another node is dragged over them?

If the text is not clear enough & a drop in example is required, please let me know.


13 Sep 2009, 2:35 PM
sometimes the sweetness of google escapes me.

use the following config instead of "leaf:true"


just glad that sweetness comes back sooner or later.