MCPcopy Create free account
hub / github.com/adobe/react-spectrum / containsPoint

Method containsPoint

packages/react-stately/src/virtualizer/Rect.ts:120–122  ·  view source on GitHub ↗

* Returns whether the rectangle contains the given point. * * @param point - The point to check.

(point: Point)

Source from the content-addressed store, hash-verified

118 * @param point - The point to check.
119 */
120 containsPoint(point: Point): boolean {
121 return this.x <= point.x && this.y <= point.y && this.maxX >= point.x && this.maxY >= point.y;
122 }
123
124 /**
125 * Returns the first corner of this rectangle (from top to bottom, left to right)

Callers 1

getCornerInRectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected