Hi,
Please forgive my poor English.
The problem is that When I click the ContentMenu, can I get the node or group witch I right click the mouse?
Because I have to get the key of the group.
https://forum.nwoods.com/uploads/db3963/original/2X/6/62248f45473c28145f2e47b842eef7c0fda84d7c.png
The second argument to the click event handler is the GraphObject on which the event was declared.
In your case, obj
will be the “ContextMenuButton”, a Panel.
Thus obj.part
will be the context menu, an Adornment. GraphObject | GoJS API
So obj.part.adornedPart
will be the group. Adornment | GoJS API
Then in version 1.8 obj.part.adornedPart.key
will be the group’s key. Part | GoJS API
Thanks a lot, this really solved my problem!