Skip to main content

Home > @jsplumbtoolkit/browser-ui > Surface > isInViewport

Surface.isInViewport() method

Returns whether or not the given point (relative to page origin) is within the viewport for the widget.

Signature:

isInViewport(x: number, y: number): boolean;

Parameters

ParameterTypeDescription
xnumberX location of point to test
ynumberY location of point to test

Returns:

boolean

True if the point is within the viewport, false if not.