ResizeApi<T, C> extension
Resize operations for NodeFlowController.
This extension provides unified resize APIs that work for any resizable node,
including GroupNode and CommentNode. The node must have Node.isResizable
set to true.
Resize Lifecycle
- startResize - Captures original bounds and locks canvas
- updateResize - Calculates new bounds using absolute positioning
- endResize - Commits changes and unlocks canvas
- cancelResize - Reverts to original bounds and unlocks canvas
Example
// In a resize handle widget:
void _handleDragStart(DragStartDetails details) {
controller.startResize(nodeId, ResizeHandle.bottomRight, details.globalPosition);
}
void _handleDragUpdate(DragUpdateDetails details) {
controller.updateResize(details.globalPosition);
}
void _handleDragEnd(DragEndDetails details) {
controller.endResize();
}
- on
-
- NodeFlowController<
T, C>
- NodeFlowController<
Methods
-
cancelResize(
) → void -
Available on NodeFlowController<
Cancels a resize operation and reverts to original position/size.T, C> , provided by the ResizeApi extension -
endResize(
) → void -
Available on NodeFlowController<
Ends the current resize operation.T, C> , provided by the ResizeApi extension -
startResize(
String nodeId, ResizeHandle handle, Offset globalPosition) → void -
Available on NodeFlowController<
Starts a resize operation for any resizable node.T, C> , provided by the ResizeApi extension -
updateResize(
Offset globalPosition) → void -
Available on NodeFlowController<
Updates the size of the currently resizing node during a resize operation.T, C> , provided by the ResizeApi extension