@mocanvas/mocanvas · function

toElbowArrowRoute

declare function toElbowArrowRoute(route: ElbowRoute, ends?: {
    aEdge?: ElbowArrowSide | null;
    bEdge?: ElbowArrowSide | null;
    range?: ElbowArrowRange;
}): ElbowArrowRoute

Lift the polyline elbow-helpers produced into the documented route shape.

name is the router's case: "hvh" and "vhv" for the three-leg routes, "hv" and "vh" for the two-leg ones, "straight" when the terminals line up. It is derived from the corners rather than passed in, so a route and its name can never disagree.

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.