addNodeDependency method
void
addNodeDependency(
- String annotationId,
- String nodeId, {
- AnnotationBehavior type = AnnotationBehavior.follow,
Implementation
void addNodeDependency(
String annotationId,
String nodeId, {
AnnotationBehavior type = AnnotationBehavior.follow,
}) {
final annotation = _annotations[annotationId];
if (annotation != null) {
annotation.addDependency(nodeId);
// If this is a group, update its bounds immediately
if (annotation is GroupAnnotation) {
final dependentNodes = annotation.dependencies
.map((id) => _parentController.nodes[id])
.where((node) => node != null)
.cast<Node<T>>()
.toList();
if (dependentNodes.isNotEmpty) {
_updateGroupAnnotation(annotation, dependentNodes);
}
}
}
}