This sample demonstrates buttons that appear when the user hovers over a node with the mouse. The advantage of using an Adornment is that it keeps the Node template simpler. That means there are less resources used to create nodes -- only that one adornment can be shown.

However, using a template as the Part.selectionAdornmentTemplate would allow for more than one set of buttons to be shown simultaneously, one set for each selected node.

This technique does not work on touch devices.

If you want to show such an Adornment on mouseEnter and mouseLeave, rather than on mouseHover, the code is given in the documentation for the GraphObject.mouseEnter property.

加入 GoJS 交流群
GoJS 交流群 (769862113)