Closed kpetrow closed 5 months ago
sorta of hacky workaround that can give you the sibling instead of the target
FLEET_EXPLORER_JSTREE.get_node(data.event.target);
then loop through item and parents until you hit the type? that you are looking through;
if (newFleetId.type == 'myType') {
newFleetId = newFleetId.id
} else {
for (var i = 0; i < newFleetId.parents.length; i++) {
var temp = FLEET_EXPLORER_JSTREE.get_node(newFleetId.parents[i]);
if (temp.type == 'myType') {
newFleetId = temp.id;
break;
}
}
};
figured it out. move_node event although this seems like on drag but not
Currently when i get the id of the node on the DND_stop event it still ahs the old parent id. Where do i get the new parent id?