MCPcopy Create free account
hub / github.com/callstack/agent-device / containsPoint

Function containsPoint

src/utils/scroll-edge-state.ts:309–316  ·  view source on GitHub ↗
(rect: NonNullable<SnapshotNode['rect']>, point: Point)

Source from the content-addressed store, hash-verified

307}
308
309function containsPoint(rect: NonNullable<SnapshotNode['rect']>, point: Point): boolean {
310 return (
311 point.x >= rect.x &&
312 point.x <= rect.x + rect.width &&
313 point.y >= rect.y &&
314 point.y <= rect.y + rect.height
315 );
316}
317
318function isUsableRect(rect: SnapshotNode['rect']): rect is NonNullable<SnapshotNode['rect']> {
319 return Boolean(rect && rect.width > 0 && rect.height > 0);

Callers 1

selectScrollContainerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…