NgDiagramGroupsService
The NgDiagramGroupsService
provides methods for managing node groups in the diagram.
Example usage
Section titled “Example usage”private groupsService = inject(NgDiagramGroupsService);
// Add nodes to a groupthis.groupsService.addToGroup('groupId', ['nodeId1', 'nodeId2']);
Extends
Section titled “Extends”NgDiagramBaseService
Methods
Section titled “Methods”addToGroup()
Section titled “addToGroup()”addToGroup(
groupId
,nodeIds
):void
Adds nodes to a group.
Parameters
Section titled “Parameters”groupId
Section titled “groupId”string
The ID of the group to add nodes to.
nodeIds
Section titled “nodeIds”string
[]
Array of node IDs to add to the group.
Returns
Section titled “Returns”void
highlightGroup()
Section titled “highlightGroup()”highlightGroup(
groupId
,nodes
):void
Highlights a group.
Parameters
Section titled “Parameters”groupId
Section titled “groupId”string
The ID of the group to highlight.
Node
[]
The nodes to highlight as part of the group.
Returns
Section titled “Returns”void
highlightGroupClear()
Section titled “highlightGroupClear()”highlightGroupClear():
void
Clears all group highlights.
Returns
Section titled “Returns”void
removeFromGroup()
Section titled “removeFromGroup()”removeFromGroup(
groupId
,nodeIds
):void
Removes nodes from a group.
Parameters
Section titled “Parameters”groupId
Section titled “groupId”string
The ID of the group to remove nodes from.
nodeIds
Section titled “nodeIds”string
[]
Array of node IDs to remove from the group.
Returns
Section titled “Returns”void