WeaveFitToScreenToolAction
Set the zoom level so all the nodes on the stage are entirely visible on the screen
Overview
The WeaveFitToScreenToolAction class that automatically adjusts the canvas viewport so that all visible content (nodes) is centered and scaled to fit within the current view. It provides users with a convenient way to reorient the canvas, especially after zooming or panning extensively.
This action is commonly used as a “reset view” or “zoom to fit” feature in collaborative or design tools.
The class extends the WeaveAction class.
Name
This action name
property value is fitToScreenTool
.
Import
import { WeaveFitToScreenToolAction } from "@inditextech/weave-sdk";
Instantiation
new WeaveFitToScreenToolAction();
TypeScript types
type WeaveFitToScreenToolActionParams = {
previousAction: string;
};
Trigger function params
trigger(cancelAction: () => void, params?: WeaveFitToScreenToolActionParams): void;
For WeaveFitToScreenToolActionParams
:
Prop | Type | Default |
---|---|---|
previousAction | string | - |