Skip to main content

Home > @jsplumbtoolkit/browser-ui > intersects

intersects() function

Calculates whether or not the two rectangles intersect.

Signature:

export declare function intersects(r1: RectangleXY, r2: RectangleXY): boolean;

Parameters

ParameterTypeDescription
r1RectangleXYFirst rectangle
r2RectangleXYSecond rectangle

Returns:

boolean

True if the rectangles intersect, false otherwise.