pycodestyle
pycodestyle copied to clipboard
Get the node & anchor id on Edge drop event
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!
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.
Works great! Yeah, definitely there might be a better way, what direction are you thinking to take this in?