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
Parameter | Type | Description |
---|---|---|
x | number | X location of point to test |
y | number | Y location of point to test |
Returns:
boolean
True if the point is within the viewport, false if not.