internalMarkNodeDirty method
Marks a node as needing spatial index update. If no drag is in progress (or debug mode is on), updates immediately. Otherwise, defers until drag ends.
Implementation
void internalMarkNodeDirty(String nodeId) {
if (_shouldDeferSpatialUpdates) {
_pendingNodeUpdates.add(nodeId);
// Also mark connected connections as dirty
final connectedIds = _connectionsByNodeId[nodeId];
if (connectedIds != null) {
_pendingConnectionUpdates.addAll(connectedIds);
}
} else {
// Immediate update
final node = _nodes[nodeId];
if (node != null) {
_spatialIndex.update(node);
_updateConnectionBoundsForNode(nodeId);
}
}
}