TargetInfo is always undefined (eachDroppable)
Closed this issue · 4 comments
I’m using Vue 3 and aiming to achieve the following:
While a user is dragging an object, I want to use eachDroppable to return a boolean based on certain rules. For these rules, I need access to the starting information of the dragged node (its parent, index within the parent, and level) as well as the target information (potential parent, index, and level) at the current hover position.
However, when I use dragContext, targetInfo is always undefined, which only allows me to access the starting information of the dragged node.
Is this a bug, or am I overlooking a property?
Thank you!
dragContext.targetInfo.any, nolet {targetInfo} = dragContext; targetInfo.any- targetInfo is available after mouse up
eachDroppable(stat) { stat.data }, you should use the first arg of eachDroppable.
The first arg of eachDroppable doesn’t include the future index on target. Could this be added in future versions ?
try 2.9.1. use dragContext.closestNode. It is the closest node's Stat when drag.
It works perfectly! I'll use closestNode to create rules.
Thank you for the new feature and the quick development!