Commit 56cf3b0
committed
fix(system): include hidden intrinsic-sized nodes in fitView when includeHiddenNodes is set
getFitViewNodes gated every node on measured dimensions
(n.measured.width && n.measured.height). Hidden nodes are never rendered
so they have no measured size, which meant a hidden node that declares an
intrinsic size (width/height or initialWidth/initialHeight) was dropped
from the fit even when includeHiddenNodes: true was passed.
When includeHiddenNodes is set, fall back to the node's declared
dimensions via getNodeDimensions (the same measured -> width ->
initialWidth fallback nodeToBox already uses to compute bounds), so such
nodes contribute to the fit. Truly size-less nodes are still skipped, and
the default path (without includeHiddenNodes) keeps its exact previous
behavior.
Fixes #58411 parent f55ed9e commit 56cf3b0
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
343 | 356 | | |
344 | 357 | | |
345 | 358 | | |
| |||
0 commit comments