@samatawy/diagrams
    Preparing search index...

    Interface HasSelection

    Payload for selection change events, which includes the currently selected nodes and their IDs.

    interface HasSelection {
        selection(): INode[];
        isSelected(node: INode): boolean;
        select(node: INode, option: "in_group" | "isolated"): void;
        deselect(node: INode, option: "in_group" | "isolated"): void;
        clearSelection(): void;
    }

    Implemented by

    Index

    Methods

    • Returns an array of currently selected nodes in the diagram.

      Returns INode[]

      An array of INode objects representing the selected nodes.

    • Checks if a given node is currently selected in the diagram.

      Parameters

      • node: INode

        The node to check for selection.

      Returns boolean

      True if the node is selected, false otherwise.

    • Selects a given node in the diagram.

      Parameters

      • node: INode

        The node to select.

      • option: "in_group" | "isolated"

        The selection option, either 'in_group' or 'isolated'.

      Returns void

    • Deselects a given node in the diagram.

      Parameters

      • node: INode

        The node to deselect.

      • option: "in_group" | "isolated"

        The selection option, either 'in_group' or 'isolated'.

      Returns void

    • Clears the current selection in the diagram.

      Returns void