@mocanvas/mocanvas · function

getArrowTerminalsInArrowSpace

declare function getArrowTerminalsInArrowSpace(editor: Editor, arrow: ArrowShape): ArrowTerminals

Resolve both terminals of an arrow in arrow-local space.

Unbound terminals come straight from props. A bound terminal starts at its anchor inside the bound shape's bounds; unless the binding is exact it is then pulled back to where the arrow body first crosses the bound shape's outline on its way from the opposite terminal. If the body never crosses the outline (e.g. the other terminal is inside the shape) the anchor is used.

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.