pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

Get the node & anchor id on Edge drop event

Open rohanrajpal opened this issue 2 years ago • 2 comments

Thanks a lot for sending the x & y for the edge drop event in #288 , just realized that one last useful prop in the detail would be the nodeId & anchorId form where the edge was dropped.

My use case is to open a modal on edge drop, allow the user to select the new node & programatically connect to that new node. So knowing from which node & anchor id the drop event came from becomes essential!

rohanrajpal avatar May 01 '23 06:05 rohanrajpal

This has been added in the latest version.

The event detail takes now has a cursor key and a source key, the latter of which has the node and anchor IDs.

That said, I think there's a better solution for this and I'll try to work through it when I have the time.

briangregoryholmes avatar May 02 '23 18:05 briangregoryholmes

Works great! Yeah, definitely there might be a better way, what direction are you thinking to take this in?

rohanrajpal avatar May 03 '23 07:05 rohanrajpal