updateResize method

void updateResize(
  1. Offset delta
)

Updates the size of the currently resizing node during a resize operation.

Delegates to Node.resize which handles all resize handle calculations and size constraints. After resize, updates visual position with snapping.

Implementation

void updateResize(Offset delta) {
  final nodeId = interaction.currentResizingNodeId;
  final handle = interaction.currentResizeHandle;
  if (nodeId == null || handle == null) return;

  final node = _nodes[nodeId];
  if (node != null && node.isResizable) {
    // Safe cast: isResizable guarantees ResizableMixin
    (node as ResizableMixin<T>).resize(handle, delta);
    runInAction(() {
      node.setVisualPosition(
        _config.snapToGridIfEnabled(node.position.value),
      );
    });
    internalMarkNodeDirty(nodeId);
  }
}