onNodesDeleted method
Called when nodes are deleted from the graph.
Override this method to respond when nodes that this annotation tracks or contains are deleted.
The context provides access to remaining nodes for operations
like refitting bounds.
For GroupAnnotation, this removes nodes from explicit membership and triggers a refit for explicit behavior.
Example
@override
void onNodesDeleted(Set<String> nodeIds, AnnotationDragContext context) {
final removed = _trackedNodeIds.intersection(nodeIds);
_trackedNodeIds.removeAll(removed);
if (removed.isNotEmpty) {
_refitBounds(context);
}
}
Implementation
void onNodesDeleted(Set<String> nodeIds, AnnotationDragContext context) {
// Default implementation does nothing
}