Right click menus
Background menu
The main background menu (right-click on the canvas) is generated by a call toLGraphCanvas.getCanvasMenuOptions. The standard way of editing this is to implement the getCanvasMenuItems method on your extension:
Node menu
When you right click on a node, the menu is similarly generated bynode.getExtraMenuOptions.
The standard way is to implement the getNodeMenuItems method on your extension:
Submenus
If you want a submenu, use thesubmenu property with an options array:
Capture UI events
This works just like you’d expect - find the UI element in the DOM and add an eventListener.setup() is a good place to do this, since the page
has fully loaded. For instance, to detect a click on the ‘Queue’ button:
Detect when a workflow starts
This is one of manyapi events:
Detect an interrupted workflow
A simple example of hijacking the api:Catch clicks on your node
node has a mouseDown method you can hijack.
This time we’re careful to pass on any return value.