EagleFox EagleFox - 2 months ago 8x
Javascript Question

how to get value of a node where a leaf is dropped in a tree

I have a tree panel where a leaf can be dropped to a node. I want to get the value of that node where the leaf is dropped.

Doing this gets me the first node and not the node where I dropped the leaf


I also tried


but this doesn't work when the node is expanded..

Kld Kld
listeners: {
    drop: function(node, data, overModel, dropPosition,  dropFunction,  eOpts ){
         console.log(data.records[0].parentNode.data);//old parent 
         console.log( overModel.parentNode.data);//new parent