I have a treeview which has some rules about the exact location that certain nodes can be dragged to.
I have been working through the logic and getting there, except I cam across this challenge
If I have 3 nodes and the same level and drag a new node between them
drag position a
drag position b
It appears that if the mouse is closets to Node2 at both drag position A and B, I can get the same drag events.
To be clear, dropTarget = 'Node2' and status is 'i-insert-middle' can happen at both Drag A and Drag B if the mouse is closest to Node2.
I think easiest demonstrated in this simple Dojo I have filtered out all events other than target for the second node and insert middle events.
drag and drop drag events
Dragging on each side of the second node can give the same drag events as per attached screen shots which show the same events for the different locations. of the drag
How can I determine where the exact location the user is dragging to? ( before they do it , so I can deny or allow)