Overview
The WeaveFrameToolAction class that allows users to create a new Frame node by clicking and dragging on the canvas. A frame acts as a visual container for organizing other nodes and structuring the workspace—similar to sections, groups, or modules in visual editors.
This action enables an intuitive, drag-to-create experience for defining new framed areas, which are immediately editable and collaborative.
Each interaction results in the creation of a WeaveFrameNode, which can be moved and synchronized across all connected users.
The class extends the WeaveAction class.
TypeScript types
type WeaveFrameToolActionTriggerParams = {
title?: string;
frameWidth?: number;
frameHeight?: number;
frameOrientation?: string;
frameType?: string;
};
Trigger function params
trigger(cancelAction: () => void, params?: WeaveFrameToolActionTriggerParams): void;
For WeaveFrameToolActionTriggerParams:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
|
|
|
The title of the Frame. |
|
|
|
|
The frame format width (px) for the Frame. |
|
|
|
|
The frame format height (px) for the Frame. |
|
|
|
|
The frame format orientation (landscape or portrait) for the Frame. |
|
|
|
|
The frame format type (A1, A2, A3, A4 or custom) for the Frame. |