onChildrenDeleted method
Called when child nodes are deleted from the graph.
Receives all deleted node IDs, allowing the grouping node to update its internal state (e.g., remove them from membership).
Implementation
@override
void onChildrenDeleted(Set<String> nodeIds) {
final removed = _nodeIds.intersection(nodeIds);
if (removed.isEmpty) return;
runInAction(() => _nodeIds.removeAll(removed));
// For explicit behavior, refit to remaining nodes
if (behavior == GroupBehavior.explicit &&
_nodeIds.isNotEmpty &&
groupContext != null) {
fitToNodes(groupContext!.getNode);
}
}