SelectionAPI#
Interface SelectionAPI
Hierarchy
- SelectionAPI
Methods
add To Selection
- add
To Selection(nodeID, silent?): Promise<ChangeSelectionResult> -
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>
-
clear Selection
- clear
Selection(silent?): Promise<ChangeSelectionResult> -
Clears the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
get Selected Leaf Nodes
get Selected Nodes
get Selection
- 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.
invert Selection
- invert
Selection(silent?): Promise<ChangeSelectionResult> -
Inverts the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
is Selected
remove From Selection
- remove
From Selection(nodeID, silent?): Promise<ChangeSelectionResult> -
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>
-
select Collection
- 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>
-
set Selection
- 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.