SelectionAPI#
Interface SelectionAPI
Hierarchy
- SelectionAPI
Methods
addToSelection
- add
To (nodeID, silent?): Promise<ChangeSelectionResult>Selection -
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: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
clearSelection
- clear
Selection (silent?): Promise<ChangeSelectionResult> -
Clears the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
getSelectedLeafNodes
getSelectedNodes
getSelection
- get
Selection (): Promise<number[]> -
Returns a list of all selected nodes.
Returns Promise<number[]>
An array which contains the IDs of all leaf Nodes in the current Selection.
Deprecated
getSelection is deprecated, please use getSelectedNodes instead.
invertSelection
- invert
Selection (silent?): Promise<ChangeSelectionResult> -
Inverts the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
isSelected
removeFromSelection
- remove
From (nodeID, silent?): Promise<ChangeSelectionResult>Selection -
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: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
selectCollection
- select
Collection (collectionID, silent?): Promise<void | ChangeSelectionResult> -
Replaces the current Selection with the Nodes from the given Collection.
Parameters
-
collectionID: number
The ID of the Collection.
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<void | ChangeSelectionResult>
-
setSelection
- set
Selection (nodeID, silent?): Promise<ChangeSelectionResult> -
Replaces the current Selection with the specified nodes.
Parameters
-
nodeID: number | number[]
The nodeID(s) to select.
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
The SelectionAPI provides basic functionalities to manipulate the current selection of Nodes.