mbraak / jqTree

Tree widget for jQuery
https://mbraak.github.io/jqTree/
Apache License 2.0
1.02k stars 177 forks source link

Question: Is there a way to know when dragging a node if it's dropped at its same place before dragging or not? #689

Closed Amira-Samir closed 2 years ago

mbraak commented 2 years ago

I'm afraid that's not possible. There is a tree.move event, but it's not triggered when the node is dropped at exactly the place. https://mbraak.github.io/jqTree/#event-tree-move

Can I ask you where you want to use this for? Do you want to perform a particular action when dragging to the same place?

Amira-Samir commented 2 years ago

I need to save dragging updates instantly in DB, so I need to make sure I don't hit the DB unless the node is actually moved from its place

mbraak commented 2 years ago

Are you using the tree.move event for the updates? In that case it's not an issue because the event is only triggered if the node moves to a different place.

Amira-Samir commented 2 years ago

worked fine .. many thanks @mbraak