Class ContextMenu

context menu for nodes and edges

Constructors

Properties

Methods

Constructors

  • Fill the context menu and register it with configuration, which will show it for the node and edge selectors. The extension itself is already registered through the plain HTML/JS import in index.html, which makes available cy.contextMenus().

    Parameters

    • graph: Graph

      the graph that the context menu applies to

    • menuItems: MenuItem[]

    Returns ContextMenu

Properties

graph: Graph

Methods

  • Add tooltips to all menu entries.

    Parameters

    • cxtMenu: any

      a context menu without tooltips

    Returns void

  • Add a logging wrapper to a context menu command.

    Parameters

    • cmd: { content: any; onClickFunction: any }

      the context menu command to wrap if it isn't already wrapped

    • messageFunction: (ele: Element) => any

      a function that describes the element

    Returns void