LightBox-style context menu GoJS Sample
This demonstrates the implementation of a custom context menu in the LightBox style commonly used on mobile devices.
For a regular HTML context menu implementation, see the Custom Context Menu sample.
Right-click or tap-hold on a Node to bring up a context menu. If you have a selection copied in the clipboard, you can bring up a context menu anywhere to paste.
The "Color" command changes the color of the selected node(s), alternating between "red" and a random color. It does so by iterating over the Diagram.selection and calling Model.setDataProperty to set the "color" property of each node's data. This assumes that there is a data Binding in the node template that depends on the "color" property on the data.