@mocanvas/mocanvas · interface

ElbowArrowRoute

interface ElbowArrowRoute

A routed elbow: the polyline, and everything a caller needs to describe it.

name identifies which of the router's cases produced it ("hvh", "vh", "straight", …). It is not decoration: when two candidate routes are the same length the name is the tie-break, and keeping the previous frame's name is what stops a route flipping between two equally good answers while a shape is dragged.


Properties · 7

aEdge: ElbowArrowSide | null

The side of A the arrow leaves, or null when A is a bare point.

bEdge: ElbowArrowSide | null

The side of B the arrow enters, or null when B is a bare point.

corners: Vec[]

The corner points before filleting — what a handle or a hit test wants.

distance: number

Total length of the un-filleted route; the router's cost function.

midpointHandle: ElbowArrowMidpointHandle | null
name: string
points: Vec[]

The drawn polyline, corners already filleted.

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.