NgDiagramSelectionService
The NgDiagramSelectionService
provides methods for managing the selection state of nodes and edges in the diagram.
Example usage
Section titled “Example usage”private selectionService = inject(NgDiagramSelectionService);
// Select nodes and edgesthis.selectionService.select(['nodeId1'], ['edgeId1']);
Extends
Section titled “Extends”NgDiagramBaseService
Properties
Section titled “Properties”selection
Section titled “selection”selection:
Signal
<{edges
:Edge
<object
>[];nodes
:Node
[]; }>
Returns a computed signal for the current selection of nodes and edges.
Methods
Section titled “Methods”deleteSelection()
Section titled “deleteSelection()”deleteSelection():
void
Deletes the current selection of nodes and edges.
Returns
Section titled “Returns”void
deselect()
Section titled “deselect()”deselect(
nodeIds
,edgeIds
):void
Deselects nodes and edges by their IDs.
Parameters
Section titled “Parameters”nodeIds
Section titled “nodeIds”string
[] = []
Array of node IDs to deselect.
edgeIds
Section titled “edgeIds”string
[] = []
Array of edge IDs to deselect.
Returns
Section titled “Returns”void
deselectAll()
Section titled “deselectAll()”deselectAll():
void
Deselects all currently selected nodes and edges.
Returns
Section titled “Returns”void
select()
Section titled “select()”select(
nodeIds
,edgeIds
):void
Selects nodes and edges by their IDs.
Parameters
Section titled “Parameters”nodeIds
Section titled “nodeIds”string
[] = []
Array of node IDs to select.
edgeIds
Section titled “edgeIds”string
[] = []
Array of edge IDs to select.
Returns
Section titled “Returns”void