Find selected Diagram Node

Hello there, we have a ReactPalette and ReactDiagram. Only one Node maximum can be selected and we’re dropping Palette Nodes onto Diagram Nodes and the user is supposed to first SELECT the Diagram Node where a Palette Node will be dropped into. Through the event handlers I am able to find the Palette Node being dropped and the Diagram Node it was dropped into however, there’s the scenario where a user drops the Palette Node NOT into the SELECTED Diagram Node and so my issue is that I can’t figure out which API to use to retrieve the SELECTED Diagram Node…

Thank you!


That method is giving me the Palette dropped Node.
The event mouseDrop params is giving me the Diagram Node that received the dropped Node from the Palette.

What I need now is the Diagram Node that is/was currently selected when the Drop event occurred… and I don’t mean the Node that received the dropped Node. To further clarify, I need to find 3 Nodes… I got 2 so far…

Ah, I see. Try overriding DraggingTool.simulatedMouseUp on the target Diagram’s ToolManager.draggingTool. It’s undocumented, but see its signature in the go.d.ts file.

Make a copy of the Diagram.selection collection.
Then call the super method.