mouseDrop on a graph Node

I would like to add a mouseDrop method to my node template and know 2 things when that drop method is called: what was dropped and what it was dropped on. for the latter, I mean what specific instance of the template including any information that I may have added to the node when I created the graph model. I am passed 2 arguments. I expect that one is an event and one is the dropped object. Is the item dropped upon buried somewhere in the event?

Thanks for your help

obj in your code is the object that has been dropped on. To get the whole node that was dropped on you can use obj.part

For what is currently being dropped, its whatever the selection is, so use myDiagram.selection.

thanks. for myDiagram.selection, is the true if I am dragging from a palette? or would I need to get the selection from the palette?

Yes, the diagram.selection will be the contents of the drop, even if its from another diagram (the palette)

thank you for your quick response. I have it working