mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Set width/height also to Undefined when we change the measure mode to Undefined
Summary: Make sure width/height is always passed as Undefined when measure mode is changed to Undefined. Changelog: [Internal][Yoga] Set width and height as Undefined when we change measure mode to Undefined Reviewed By: alickbass Differential Revision: D20029838 fbshipit-source-id: b9931f6ddb13ffd1565889535ade5bbffbe0c304
This commit is contained in:
1 parent
4305a291a9
commit
49c90e96fa
1 file changed
+9
-2
@@ -1663,8 +1663,8 @@ static void YGNodeAbsoluteLayoutChild(
|
||||
|
||||
static void YGNodeWithMeasureFuncSetMeasuredDimensions(
|
||||
const YGNodeRef node,
|
||||
const float availableWidth,
|
||||
const float availableHeight,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
const YGMeasureMode widthMeasureMode,
|
||||
const YGMeasureMode heightMeasureMode,
|
||||
const float ownerWidth,
|
||||
@@ -1677,6 +1677,13 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(
|
||||
node->hasMeasureFunc(),
|
||||
"Expected node to have custom measure function");
|
||||
|
||||
if (widthMeasureMode == YGMeasureModeUndefined) {
|
||||
availableWidth = YGUndefined;
|
||||
}
|
||||
if (heightMeasureMode == YGMeasureModeUndefined) {
|
||||
availableHeight = YGUndefined;
|
||||
}
|
||||
|
||||
const float paddingAndBorderAxisRow =
|
||||
YGNodePaddingAndBorderForAxis(node, YGFlexDirectionRow, ownerWidth);
|
||||
const float paddingAndBorderAxisColumn =
|
||||
|
||||
Reference in new issue
Block a user