MCPcopy Create free account
hub / github.com/codeaashu/claude-code / zeroLayoutRecursive

Function zeroLayoutRecursive

src/native-ts/yoga-layout/index.ts:2386–2404  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

2384}
2385
2386function zeroLayoutRecursive(node: Node): void {
2387 for (const c of node.children) {
2388 c.layout.left = 0
2389 c.layout.top = 0
2390 c.layout.width = 0
2391 c.layout.height = 0
2392 // Invalidate layout cache — without this, unhide → calculateLayout finds
2393 // the child clean (!isDirty_) with _hasL intact, hits the cache at line
2394 // ~1086, restores stale _lOutW/_lOutH, and returns early — skipping the
2395 // child-positioning recursion. Grandchildren stay at (0,0,0,0) from the
2396 // zeroing above and render invisible. isDirty_=true also gates _cN and
2397 // _fbBasis via their (sameGen || !isDirty_) checks — _cGen/_fbGen freeze
2398 // during hide so sameGen is false on unhide.
2399 c.isDirty_ = true
2400 c._hasL = false
2401 c._hasM = false
2402 zeroLayoutRecursive(c)
2403 }
2404}
2405
2406function collectLayoutChildren(node: Node, flow: Node[], abs: Node[]): void {
2407 // Partition a node's children into flow and absolute lists, flattening

Callers 1

collectLayoutChildrenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected