@mocanvas/mocanvas · class

ShapeHandleOverlayUtil

declare class ShapeHandleOverlayUtil extends OverlayUtil<Editor, ShapeHandleOverlayUtilOptions>

Paints, and hit-tests, the handles of the single selected shape.


Methods · 7

getCursor(): string
getDisplayValues(): ShapeHandleOverlayUtilDisplayValues

The colours to draw with, read fresh from the theme on every frame.

getGeometry(overlay: TLOverlay): Geometry2d | undefined

A square hit region around the handle, in page units.

Square rather than round because it is a *target*, not the drawing: a rectangle is cheaper to test, and the difference between the two at this size is smaller than the pointer's own precision.

protected getHandleShape(): UnknownShape | undefined

The shape whose handles are showing, or undefined.

One shape only. With several selected there is no unambiguous answer to "drag this vertex", and a canvas covered in every selected arrow's terminals is unreadable besides.

getOverlays(): TLShapeHandleOverlay[]
isActive(): boolean
render(ctx: CanvasRenderingContext2D): void

Properties · 3

static options: ShapeHandleOverlayUtilOptions
static type: string
static zIndex: number

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.