g3-toolkit API Reference
    Preparing search index...

    Interface SelectionState

    interface SelectionState {
        addEdgesToSelection: (ids: string[]) => void;
        addNodesToSelection: (ids: string[]) => void;
        clearSelection: () => void;
        hoveredNodeId: string | null;
        removeNodesFromSelection: (ids: string[]) => void;
        selectedEdgeIds: Set<string>;
        selectEdges: (ids: string[]) => void;
        selectedNodeIds: Set<string>;
        selectNodes: (ids: string[]) => void;
        setHover: (nodeId: string | null) => void;
        toggleNodeSelection: (id: string) => void;
    }
    Index

    Properties

    addEdgesToSelection: (ids: string[]) => void

    Add edge IDs to the existing selection.

    addNodesToSelection: (ids: string[]) => void

    Add node IDs to the existing selection (shift-click).

    clearSelection: () => void

    Clear all node and edge selections.

    hoveredNodeId: string | null

    Node currently being hovered (null if none).

    removeNodesFromSelection: (ids: string[]) => void

    Remove ids from the node selection (review 4.12: the collapse counterpart to addNodesToSelection).

    selectedEdgeIds: Set<string>

    Currently selected edge IDs.

    selectEdges: (ids: string[]) => void

    Replace the entire selection with the given edge IDs.

    selectedNodeIds: Set<string>

    Currently selected node IDs.

    selectNodes: (ids: string[]) => void

    Replace the entire selection with the given node IDs.

    setHover: (nodeId: string | null) => void

    Set the hovered node (or null to clear hover).

    toggleNodeSelection: (id: string) => void

    Toggle a node in/out of selection (ctrl-click).