Skip to content

Commit

Permalink
Fix a layout bug in Yoga
Browse files Browse the repository at this point in the history
Keep independent variables for the childWidthRef and childHeightRef.
  • Loading branch information
squarejesse committed Oct 1, 2024
1 parent ddc0f0c commit 09fe82b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Fixed:
- Don't clip elements of `Column` and `Row` layouts whose unbounded size exceeds the container size.
- Correctly implement margins for `Box` on iOS.
- Correctly handle dynamic updates to modifiers on `Column` and `Row`.
- Fix a layout bug where children of fixed-with `Row` containers were assigned the wrong width.


## [0.14.0] - 2024-08-29
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1745,15 +1745,17 @@ internal object Yoga {
mode = childWidthMeasureMode,
size = childWidthRef,
)
childWidth = childWidthRef.argValue
val childHeightRef = RefObject(childHeight)
YGConstrainMaxSizeForMode(
node = child,
axis = YGFlexDirection.YGFlexDirectionColumn,
ownerAxisSize = ownerHeight,
ownerWidth = ownerWidth,
mode = childHeightMeasureMode,
size = childWidthRef,
size = childHeightRef,
)
childWidth = childWidthRef.argValue
childHeight = childHeightRef.argValue
YGLayoutNodeInternal(
node = child,
availableWidth = childWidth,
Expand Down

0 comments on commit 09fe82b

Please sign in to comment.