@mocanvas/mocanvas · class
declare class ShapeHandleOverlayUtil extends OverlayUtil<Editor, ShapeHandleOverlayUtilOptions>Paints, and hit-tests, the handles of the single selected shape.
Methods · 7
getCursor(): stringgetDisplayValues(): ShapeHandleOverlayUtilDisplayValuesThe colours to draw with, read fresh from the theme on every frame.
getGeometry(overlay: TLOverlay): Geometry2d | undefinedA 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 | undefinedThe 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(): booleanrender(ctx: CanvasRenderingContext2D): voidProperties · 3
static options: ShapeHandleOverlayUtilOptionsstatic type: stringstatic zIndex: numbermocanvas 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.