I am trying to implement some drag drop functionality in a d3 tree where when a node is being dragged if it is 50 pixels directly to the left of a node I would like to draw a dotted connector to indicate that if you release the node should be moved as a child here.
In order to do this my idea is that i check what element is 50 pixels to the left. Is there a way to see what is at a particular x,y position in d3? What i tried was checking this during the dragmove.
document.elementFromPoint(d3.event.x, d3.event.y);
However, this only returns the svg element. Is there a similar way in d3 or any other ideas?
-Tim