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

Method addNodes

packages/react-stately/src/layout/ListLayout.ts:241–251  ·  view source on GitHub ↗
(nodes: LayoutNode[])

Source from the content-addressed store, hash-verified

239 let res: LayoutInfo[] = [];
240
241 let addNodes = (nodes: LayoutNode[]) => {
242 for (let node of nodes) {
243 if (this.isVisible(node, rect)) {
244 res.push(node.layoutInfo);
245
246 if (node.children) {
247 addNodes(node.children);
248 }
249 }
250 }
251 };
252
253 addNodes(this.rootNodes);
254 return res;

Callers

nothing calls this directly

Calls 2

isVisibleMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected