Skip to main content

Home > @jsplumb/connector-bezier > nearestPointOnCurve

nearestPointOnCurve() function#

Calculates the nearest point to the given point on the given curve. The return value of this is a JS object literal, containing both the point's coordinates and also the 'location' of the point (see above).

Signature:

export declare function nearestPointOnCurve(point: PointXY, curve: Curve): {    point: PointXY;    location: number;};

Parameters#

ParameterTypeDescription
pointPointXY
curveCurve

Returns:

{ point: PointXY; location: number; }