@samatawy/diagrams
    Preparing search index...

    Class DiagramTopMenu

    A context menu pre-populated with diagram editing actions.

    Wire it to a DiagramView by assigning to view.contextMenu. The view will call open() when a right-click event fires.

    const menu = new DiagramTopMenu(editorView);
    editorView.contextMenu = menu;

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    host: HTMLElement
    target: unknown
    menuElement: HTMLElement | null = null
    topLevel: (TopMenuItem | DropDownMenu)[] = []

    The top-level menu items, including both dropdowns and individual items.

    dropDownMenus: DropDownMenu[] = []

    All dropdown menus, extracted from the top-level items.

    selectedDropDown?: DropDownMenu

    The currently selected dropdown menu, if any.

    activeDropDown?: DropDownMenu

    The currently opened dropdown menu, if any.

    selectedMenuItem?: TopMenuItem | DropDownMenu

    The currently selected menu item, if any. This may be a top-level dropdown or a menu item inside a dropdown.

    Accessors

    Methods