Weave.js

WeaveFrameToolAction

Allows to add a canvas in canvas area

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.

Name

This action name property value is frameTool.

Import

import { WeaveFrameToolAction } from "@inditextech/weave-sdk";

Instantiation

new WeaveFrameToolAction();

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:

PropTypeDefault
frameType?
string
A4
frameOrientation?
string
landscape
frameHeight?
number
1050
frameWidth?
number
1485
title?
string
Frame XXX