pivotick - v3.0.0
    Preparing search index...

    Interface MainHeader

    Define what should be displayed in the sidebar's main header slot for node or edges.

    These maps also name elements elsewhere — the tooltip's header, the table's Name column, [[node]] note references — so they are about naming, not about one panel. The strip along the top of the canvas is a different thing entirely: switch that off with GraphUI.topBar.

    interface MainHeader {
        edgeHeaderMap: HeaderMapEntry<Edge>;
        nodeHeaderMap: HeaderMapEntry<Node>;
        render?:
            | string
            | HTMLElement
            | (
                (
                    element: Node | Node[] | Edge | Edge[] | null,
                    ctx: RenderContext,
                ) => FallbackRenderResult
            );
    }
    Index

    Properties

    edgeHeaderMap: HeaderMapEntry<Edge>
    nodeHeaderMap: HeaderMapEntry<Node>
    render?:
        | string
        | HTMLElement
        | (
            (
                element: Node | Node[] | Edge | Edge[] | null,
                ctx: RenderContext,
            ) => FallbackRenderResult
        )

    Custom renderer for the main header. This content will override the default sidebar main header.

    undefined
    
    (element) => `element id: ${element.id}`
    

    A returned string renders as plain text; return an HTMLElement to render HTML. May be async: the slot shows a placeholder until it resolves, and a result arriving after the selection moved on is dropped.

    Return (or resolve to) undefined to hand the selection back to the default header: the nodeHeaderMap / edgeHeaderMap title for one element, the selection count for several, the canvas total for none. Return null to draw nothing.

    // A custom header for a lone element, the default counts for everything else.
    (element) => (element && !Array.isArray(element)) ? headerFor(element) : undefined