@mocanvas/mocanvas · class

FrameTool

declare class FrameTool extends BaseBoxShapeTool

Drag out a frame, or click to place a default-sized one.

Drawing a frame *around* existing shapes adopts them — the Figma behaviour, and the reason the tool is worth having over "create it, then drag things in".


Methods · 3

getCreateProps(): Record<string, unknown>
getDefaultSize(): BoxSize

A click places a full artboard, not the 160×90 a bare createShape gives.

onCreate(shape: UnknownShape | null): void

Properties · 4

static id: string
static initial: string
minSize: number
shapeType: "frame"

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.