Context Menu Config object¶
The context menu config object configures whether certain actions are available in the default context menu.
const contextMenuConfig = {
enableCreateSupernodeNonContiguous: false,
defaultMenuEntries: {
saveToPalette: true,
createSupernode: false,
displaySupernodeFullPage: true,
colorBackground: false
}
};
-
enableCreateSupernodeNonContiguous - Allows the creation of supernodes from non-contiguous nodes. When set to
true
, the “Create supernode” menu item will be added to the default context menu when the currently selected nodes are contiguous or non-contiguous. When set tofalse
, the “Create supernode” menu item is only added to the default context menu when the selected nodes are contiguous. The default value isfalse
. -
defaultMenuEntries - Controls what entries are generated in the default context menu generated by Common Canvas. This has the following properties:
- ‘saveToPalette’ - This is a boolean. The default is false. If set to true, Common Canvas will add a ‘Save to palette’ option to the default node context menu.
- ‘createSupernode’ - This is a boolean. The default is true. If set to false, Common Canvas will not show the ‘Create Supernode’ option in the default context menu for nodes.
- ‘displaySupernodeFullPage’ - This is a boolean. The default is true. If set to false, Common Canvas will not show the ‘Display full page’ option in the default context menu for supernodes. When true, the option will be displayed. Clicking that option navigates the user to the full page view of the supernode’s pipeline as if the user had clicked the expansion icon of the expanded in-place supernode view.
- ‘colorBackground’ - This is a boolean. The default is true. If set to false, Common Canvas will not show the ‘Color background’ option in the default context menu for comments. When true, the option will be displayed.
[Note: If any host app wants more control over the default context menu here, please open an issue.]