pivotick - v2.0.1
    Preparing search index...

    Interface PropertiesPanel

    Represents the configuration for the properties panel in the graph UI's sidebar

    Defines how to compute and display properties for nodes and edges.

    All key/value pairs from node.getData() or edge.getData()
    
    interface PropertiesPanel {
        edgePropertiesMap: (
            edge: Edge,
            ctx: RenderContext,
        ) => PropertyEntry[] | Promise<PropertyEntry[]>;
        enabled?: boolean;
        nodePropertiesMap: (
            node: Node,
            ctx: RenderContext,
        ) => PropertyEntry[] | Promise<PropertyEntry[]>;
        render?:
            | string
            | HTMLElement
            | (
                (
                    element: Node | Edge | Node[] | Edge[] | null,
                    ctx: RenderContext,
                ) => RenderResult
            );
    }
    Index

    Properties

    edgePropertiesMap: (
        edge: Edge,
        ctx: RenderContext,
    ) => PropertyEntry[] | Promise<PropertyEntry[]>

    A function that computes the list of edge properties to display.

    May be async — return a promise of the entries and the panel shows a placeholder until it resolves.

    All key/value pairs from edge.getData()
    
    enabled?: boolean

    Whether the sidebar shows a properties panel at all. false removes it and its separator, leaving the header, the neighbours panel and any extra panels.

    true
    
    nodePropertiesMap: (
        node: Node,
        ctx: RenderContext,
    ) => PropertyEntry[] | Promise<PropertyEntry[]>

    A function that computes the list of node properties to display.

    May be async — return a promise of the entries and the panel shows a placeholder until it resolves.

    All key/value pairs from node.getData()
    
    render?:
        | string
        | HTMLElement
        | (
            (
                element: Node | Edge | Node[] | Edge[] | null,
                ctx: RenderContext,
            ) => RenderResult
        )

    Custom renderer for the property panel. This content will override the default sidebar property panel.

    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.