update method

void update(
  1. Node<T> node
)

Updates a node in the spatial index.

Call this after any change to node position or size. Also updates all port positions for this node.

Implementation

void update(Node<T> node) {
  _nodes[node.id] = node;
  final item = NodeSpatialItem(nodeId: node.id, bounds: node.getBounds());
  _grid.addOrUpdate(item);

  // Update port positions for this node
  _updatePortsForNode(node);

  _autoFlush();
  _notifyChanged();
}