Dragging and dropping node into sub-graph

I want to drag a node and drop onto sub-graph so that it gets added into that sub-graph. There are many events such as mouse down, drag enter, drag leave, drag over etc. in go-view events list. I am confused which one should be used for my scenario. Do i need to add these events in node class or sub-graph class or both classes or go-view events? Please help me on this.

Thanks and regards,
Yogesh

Hi walter,
I got a reply from you but it disappeared before i read it.

Sorry about that – I didn’t notice that it was about GoDiagram, and had answered it assuming it was about GoJS. Alas, the answer would not have applied to GoDiagram.

ok…could you please help me on this in godiagram. I have also put other post as well related to this where i want to create gosubgraph with colored node inside but when gosubgraph is collapsed its icon should be same as that of colored node. I have put images which shows how I want it to be at the end. Please look into other post as well.

I am attaching the pic for reference here with this post.

Thanks and regards,
Yogesh

Look at OnSelectionDropped in BoxArea or Swimlanes (both in NodeLinkDemo).

also look at SubGraphDraggingTool in SubGraphApp.