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

Method addNodes

packages/@react-spectrum/ai/src/ListLayout.ts:300–310  ·  view source on GitHub ↗
(nodes: LayoutNode[])

Source from the content-addressed store, hash-verified

298 let res: LayoutInfo[] = [];
299
300 let addNodes = (nodes: LayoutNode[]) => {
301 for (let node of nodes) {
302 if (this.isVisible(node, rect)) {
303 res.push(node.layoutInfo);
304
305 if (node.children) {
306 addNodes(node.children);
307 }
308 }
309 }
310 };
311
312 addNodes(this.rootNodes);
313 return res;

Callers

nothing calls this directly

Calls 2

isVisibleMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected