LGraph.getCanvasMenuOptions
. One way to add your own menu options is to hijack this call:
node.getExtraMenuOptions
.
But instead of returning an options object, this one gets it passed in…
LiteGraph.ContextMenu
to create it:
setup()
is a good place to do this, since the page
has fully loaded. For instance, to detect a click on the ‘Queue’ button:
api
events:
node
has a mouseDown method you can hijack.
This time we’re careful to pass on any return value.