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

Method addNodes

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

Source from the content-addressed store, hash-verified

322 let res: LayoutInfo[] = [];
323
324 let addNodes = (nodes: LayoutNode[]) => {
325 for (let node of nodes) {
326 if (this.isVisible(node, rect)) {
327 res.push(node.layoutInfo);
328
329 if (node.children) {
330 addNodes(node.children);
331 }
332 }
333 }
334 };
335
336 addNodes(this.rootNodes);
337 return res;

Callers

nothing calls this directly

Calls 2

isVisibleMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected