Skip to content

Commit

Permalink
Fix a layout bug in Yoga (#2347)
Browse files Browse the repository at this point in the history
* Fix a layout bug in Yoga

Keep independent variables for the childWidthRef and childHeightRef.

* Fix changelog
  • Loading branch information
squarejesse authored Oct 1, 2024
1 parent 98c04fc commit 7db5420
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Changed:
- Nothing yet!

Fixed:
- Nothing yet!
- Fix a layout bug where children of fixed-with `Row` containers were assigned the wrong width.


## [0.15.0] - 2024-09-30
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 7db5420

Please sign in to comment.