Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

How to display the context menu of a specific shape on left click?

$
0
0

@MiniXC wrote:

I can assign a context menu to a specific part of a node by simply setting the contextMenu option, but I don't see an option (for go.HTMLInfo) to set the default event to left click instead of right click.

Displaying the context menu when clicking anywhere on the node is easy though

diagram.addDiagramListener("ObjectSingleClicked", function(e) {
  var part = e.subject.part;
  if (!(part instanceof go.Node)) {
    go.ToolManager.contextMenuTool.showContextMenu(myContextMenu, part);
  }
});

But how can I detect which shape from inside the part the click event originated from?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles