Skip to content

Commit 3432672

Browse files
sagokhalacoates-ms
authored andcommitted
Yoga: call getMeasure even when YGMeasureModeExactly (#100)
* Yoga: call getMeasure even when YGMeasureModeExactly * Revert "Yoga: call getMeasure even when YGMeasureModeExactly" This reverts commit fccb3a4. * Yoga: call getMeasure even when YGMeasureModeExactly
1 parent b087e2f commit 3432672

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ReactCommon/yoga/yoga/Yoga.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,6 +1669,16 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(
16691669
: YGFloatMax(
16701670
0, availableHeight - marginAxisColumn - paddingAndBorderAxisColumn);
16711671

1672+
// Measure the text under the current constraints.
1673+
const YGSize measuredSize = marker::MarkerSection<YGMarkerMeasure>::wrap(
1674+
node,
1675+
node->getMeasure(),
1676+
node,
1677+
innerWidth,
1678+
widthMeasureMode,
1679+
innerHeight,
1680+
heightMeasureMode);
1681+
16721682
if (widthMeasureMode == YGMeasureModeExactly &&
16731683
heightMeasureMode == YGMeasureModeExactly) {
16741684
// Don't bother sizing the text if both dimensions are already defined.
@@ -1689,16 +1699,6 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(
16891699
ownerWidth),
16901700
YGDimensionHeight);
16911701
} else {
1692-
// Measure the text under the current constraints.
1693-
const YGSize measuredSize = marker::MarkerSection<YGMarkerMeasure>::wrap(
1694-
node,
1695-
node->getMeasure(),
1696-
node,
1697-
innerWidth,
1698-
widthMeasureMode,
1699-
innerHeight,
1700-
heightMeasureMode);
1701-
17021702
node->setLayoutMeasuredDimension(
17031703
YGNodeBoundAxis(
17041704
node,

0 commit comments

Comments
 (0)