SelectionAPI#
Interface SelectionAPI
Hierarchy
- SelectionAPI
Methods
add
- addTo 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 
- 
Optionalsilent: booleanIf set to true, no event will be emitted. 
 Returns Promise<ChangeSelectionResult>
- 
clear
- clearSelection(silent?): Promise<ChangeSelectionResult> 
- 
Clears the current Selection. Parameters- 
Optionalsilent: booleanIf set to true, no event will be emitted. 
 Returns Promise<ChangeSelectionResult>
- 
get
get
get
- getSelection(): 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. DeprecatedgetSelection is deprecated, please use getSelectedNodes instead. 
invert
- invertSelection(silent?): Promise<ChangeSelectionResult> 
- 
Inverts the current Selection. Parameters- 
Optionalsilent: booleanIf set to true, no event will be emitted. 
 Returns Promise<ChangeSelectionResult>
- 
is
remove
- removeFrom 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 
- 
Optionalsilent: booleanIf set to true, no event will be emitted. 
 Returns Promise<ChangeSelectionResult>
- 
select
- selectCollection(collectionID, silent?): Promise<void | ChangeSelectionResult> 
- 
Replaces the current Selection with the Nodes from the given Collection. Parameters- 
collectionID: numberThe ID of the Collection. 
- 
Optionalsilent: booleanIf set to true, no event will be emitted. 
 Returns Promise<void | ChangeSelectionResult>
- 
set
- setSelection(nodeID, silent?): Promise<ChangeSelectionResult> 
- 
Replaces the current Selection with the specified nodes. Parameters- 
nodeID: number | number[]The nodeID(s) to select. 
- 
Optionalsilent: booleanIf set to true, no event will be emitted. 
 Returns Promise<ChangeSelectionResult>
- 
The SelectionAPI provides basic functionalities to manipulate the current selection of Nodes.