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

Function collectVisibleFlowBlocks

src/platforms/android/scroll-hints.ts:217–229  ·  view source on GitHub ↗
(
  nodes: RawSnapshotNode[],
  scrollNode: RawSnapshotNode,
)

Source from the content-addressed store, hash-verified

215}
216
217function collectVisibleFlowBlocks(
218 nodes: RawSnapshotNode[],
219 scrollNode: RawSnapshotNode,
220): FlowBlock[] {
221 const contentRoot = unwrapScrollableContentRoot(nodes, scrollNode);
222 const children = nodes
223 .filter((node) => node.parentIndex === contentRoot.index && node.rect)
224 .map((node) => node.rect as Rect)
225 .filter((rect) => hasPositiveVerticalExtent(rect))
226 .sort((left, right) => left.y - right.y);
227
228 return children.map((rect) => toFlowBlock(rect, scrollNode.rect as Rect));
229}
230
231function unwrapScrollableContentRoot(
232 nodes: RawSnapshotNode[],

Callers 1

Calls 3

toFlowBlockFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…