Hi,
I want to show a menu when the user left-clicks on a node. I used the ContextMenuTool because it is very much like what I want, except using the left click instead of the right. How can I do that?
Thanks in advance,
Jany Belluz
Before asking, I tried it that way:
// Node template
$(go.Node, {
click: (event, obj) => {
const node = obj.part;
const menu = $(go.Adornment, ...);
node.diagram.toolManager.contextMenuTool.showContextMenu(menu, node);
}
});
But my problem is that the next click on the diagram does not hide the context menu. When I click on another node, then the context menu moves to that new node. There is no way to get rid of it once it’s on the screen.