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

Method containsRect

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

* Returns whether this rectangle fully contains another rectangle. * * @param rect - The rectangle to check.

(rect: Rect)

Source from the content-addressed store, hash-verified

109 * @param rect - The rectangle to check.
110 */
111 containsRect(rect: Rect): boolean {
112 return this.x <= rect.x && this.y <= rect.y && this.maxX >= rect.maxX && this.maxY >= rect.maxY;
113 }
114
115 /**
116 * Returns whether the rectangle contains the given point.

Callers 2

layoutIfNeededMethod · 0.80
isValidMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected