Skip to main content

Home > @jsplumbtoolkit/browser-ui > perpendicularToPathAt

perpendicularToPathAt() function

calculates a line that is 'length' pixels long, perpendicular to, and centered on, the path at 'distance' pixels from the given location. if distance is not supplied, the perpendicular for the given location is computed (ie. we set distance to zero).

Signature:

export declare function perpendicularToPathAt(curve: Curve, location: number, length: number, distance: number): LineXY;

Parameters

ParameterTypeDescription
curveCurve
locationnumber
lengthnumber
distancenumber

Returns:

LineXY