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

Function inferGestureReferenceFrame

src/core/scroll-gesture.ts:175–184  ·  view source on GitHub ↗
(
  nodes: Array<Pick<SnapshotNode, 'type' | 'rect'>>,
)

Source from the content-addressed store, hash-verified

173}
174
175export function inferGestureReferenceFrame(
176 nodes: Array<Pick<SnapshotNode, 'type' | 'rect'>>,
177): GestureReferenceFrame | undefined {
178 const viewportRect = inferViewportRect(nodes);
179 if (!viewportRect) return undefined;
180 return {
181 referenceWidth: viewportRect.width,
182 referenceHeight: viewportRect.height,
183 };
184}
185
186export function pointFromPercent(
187 frame: GestureReferenceFrame,

Callers 1

handleSwipePresetCommandFunction · 0.90

Calls 1

inferViewportRectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…