pivotick - v2.0.1
    Preparing search index...

    Interface ExtraPanel

    Additional panel in the graph UI's sidebar.

    Both title and render can be:

    • A string or HTMLElement for static content, or
    • A function of the current selection (a Node, an Edge, an array of either for a multi-selection, or null when nothing is selected) — re-invoked on every selection change unless ExtraPanel.reactive is false.

    Declare panels up front via UI.extraPanels, or register them at any point in the graph's life with graph.UIManager.addPanel() (which returns a disposer).

    {
    id: 'description',
    title: 'Description',
    render: (element): HTMLElement => {
    const node = element instanceof Node ? element : null
    const div = document.createElement('div')
    div.textContent = node?.getData().description ?? 'Empty node description'
    return div
    },
    }
    interface ExtraPanel {
        alwaysVisible?: boolean;
        id?: string;
        order?: number;
        reactive?: boolean;
        render: ExtraPanelContent;
        title?: ExtraPanelContent;
    }

    Hierarchy (View Summary)

    Index

    Properties

    alwaysVisible?: boolean

    should the panel be always visible

    false
    
    id?: string

    Stable identifier, used to address the panel in removePanel / refreshPanel. Auto-generated when omitted.

    order?: number

    Display order in the sidebar, ascending. Panels sharing an order keep their registration order, so UI.extraPanels reads top-to-bottom and runtime panels append after them.

    0
    
    reactive?: boolean

    Re-resolve title and render whenever the selection changes. Set false for a panel that is expensive to build and doesn't describe the selection: it then renders once, and only an explicit refreshPanel() rebuilds it.

    true
    

    A string renders as plain text; pass an HTMLElement to render HTML.

    The panel's header row. A string renders as plain text; pass an HTMLElement to render HTML. Omit it (or resolve to blank) for a panel with no header at all.