SelectionAPI#
Interface SelectionAPI
Hierarchy
- SelectionAPI
Methods
add To Selection
- add
To Selection(nodeID: number | number[], silent?: boolean): 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?: boolean): 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.
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.
invert Selection
- invert
Selection(silent?: boolean): 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: number | number[], silent?: boolean): 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: number, silent?: boolean): 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: number | number[], silent?: boolean): 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.