SelectionAPI#

Interface SelectionAPI

The SelectionAPI provides basic functionalities to manipulate the current selection of Nodes.

Hierarchy

Methods

  • Adds the given Nodes to the Selection.

    Parameters

    • nodeID: number | number[]

      The ID of the Node that should be added to the current Selection

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>

  • Clears the current Selection.

    Parameters

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>

  • Returns a list of all selected nodes.

    Returns number[]

    An array which contains the IDs of all Nodes in the current Selection.

  • Returns all selected leaf nodes.

    Returns number[]

    An array which contains the IDs of all leaf Nodes in the current Selection.

  • Returns a list of all selected nodes.

    Deprecated

    getSelection is deprecated, please use getSelectedNodes instead.

    Returns Promise<number[]>

    An array which contains the IDs of all leaf Nodes in the current Selection.

  • Inverts the current Selection.

    Parameters

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>

  • Checks if the specified Node is part of the selection.

    Parameters

    • nodeID: number

      The ID of the node for which we would like to know if it is selected or not.

    Returns Promise<boolean>

    True of the given node is selected, otherwise false.

  • Removes the given nodes from the Selection

    Parameters

    • nodeID: number | number[]

      The ID of the Node that should be removed from the current Selection

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>

  • Replaces the current Selection with the Nodes from the given Collection.

    Parameters

    • collectionID: number

      The ID of the Collection.

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<void | ChangeSelectionResult>

  • Replaces the current Selection with the specified nodes.

    Parameters

    • nodeID: number | number[]

      The nodeID(s) to select.

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>


Did you find this page useful? Please give it a rating:
Thank you for rating this page!
Any issues or feedback?
What kind of problem would you like to report?
Please tell us more about what's wrong: