Skip to main contentElyra

Context menu config

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
}
};

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 to false, the “Create supernode” menu item is only added to the default context menu when the selected nodes are contiguous. The default value is false.

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 false. If set to true, common canvas will show the ‘Display full page’ option in the default context menu for supernodes. Clicking that option will navigate 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.

[Note: If any host app wants more control over the default context menu here, please open an issue.]