@mocanvas/mocanvas · class
declare class ArrowHintOverlayUtil extends OverlayUtil<Editor, ArrowHintOverlayUtilOptions>Outlines the shape an arrow terminal is about to bind to.
SEMANTICS-ASSUMED: which shapes count as "about to bind". The documented
surface names the overlay but does not say where its state comes from, and
mocanvas has no arrow-target state object. The hinting shape ids are the
editor's existing "a gesture in flight is aiming at this shape" channel —
Editor.setHintingShapes, which the select tool already drives for drop
targets — so an arrow tool sets them the same way and this util reads them.
The util narrows to the arrow case by only being active while an arrow is the
thing being drawn or edited; a drop-target hint during a plain drag stays
with the shape indicator compositor, which draws it heavier rather than
dashed.
Methods · 6
getDisplayValues(): ArrowHintOverlayUtilDisplayValuesThe colour to draw with, read fresh from the theme on every frame.
getGeometry(): Geometry2d | undefinedThe hint is feedback about the drag in flight; it cannot be pointed at.
getOverlays(): TLArrowHintOverlay[]isActive(): booleanprotected isArrowGestureActive(): booleanWhether an arrow gesture is what is producing the hints.
Either the arrow tool is drawing one, or an arrow is selected and one of its terminals is being dragged — in both cases the hints on screen are binding targets rather than reparenting targets.
render(ctx: CanvasRenderingContext2D): voidProperties · 3
static options: ArrowHintOverlayUtilOptionsstatic 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.