Started with the flowchart.html sample.
Added this:
myDiagram.addDiagramListener(“ObjectContextClicked”,(e) => {
var mouseEvent: MouseEvent = e.diagram.lastInput.event;
mouseEvent.cancelBubble = true;
mouseEvent.stopPropagation();
mouseEvent.preventDefault();
e.cancel = true;
return false;
});
Even with all of this, when I right click on a node, the default browser context menu displays.
I want to add some logic to this so that I can prevent the default browser context from displaying only in certain situations.
How can I accomplish this?
Is there a better even to attach to?