Skip to content

@fabwcie/free-drawing / utils/binding / getBoundEnds

Function: getBoundEnds() ​

getBoundEnds(layer, start, end): { end: Vector2d; start: Vector2d; } | null

Defined in: packages/free-drawing/src/utils/binding.ts:219

Ends of an arrow from its linked shapes (layer coordinates): at their side, or on their outline aiming at the other end (its side, its shape center or its point)

Parameters ​

layer ​

Container

layer of the arrow and its shapes

start ​

Vector2d | BoundEnd

Start linked to a shape, or start point

end ​

Vector2d | BoundEnd

End linked to a shape, or end point

Returns ​

start and end points, null when an end on outline aims at the center of its own shape

Type Literal ​

{ end: Vector2d; start: Vector2d; }

end ​

end: Vector2d = endPoint

End of arrow

start ​

start: Vector2d = startPoint

Start of arrow


null