@mocanvas/mocanvas · interface

ArrowTargetState

interface ArrowTargetState

The shape an arrow terminal is currently over, and everything derived from that.


Properties · 9

anchorInPageSpace: VecLike

Where the terminal would attach, in page space.

arrowKind: ArrowShape["props"]["kind"]

How the arrow's body is routed — the target's handles differ between kinds.

centerInPageSpace: VecLike

The target's centre, in page space.

handlesInPageSpace: {

The four side handles, in page space.

isExact: boolean

Whether the pointer is inside the target rather than merely near it.

isPrecise: boolean

Whether the binding should keep this exact anchor rather than re-centring.

normalizedAnchor: VecLike

The anchor as a 0..1 fraction of the target's bounds — what the binding stores.

snap: "none" | "center" | "edge" | "edge-point"

Which side of the target an elbow arrow must leave from, when one is forced.

target: UnknownShape

The shape being pointed at.

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.