Weave.js

WeaveRegularPolygonToolAction

Add a regular polygon to the canvas

Overview

The WeaveRegularPolygonToolAction class that allows users to create regular polygons shapes on the canvas by clicking and dragging. It provides a smooth, intuitive way to add structured, resizable star elements .

Each interaction results in the creation of a WeaveRegularPolygonNode, added to the shared state and synchronized across all users.

The class extends the WeaveAction class.

Name

This action name property value is regularPolygonTool.

Import

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

Instantiation

new WeaveRegularPolygonToolAction();