Skip to content

Commit

Permalink
Revert D4850458: [yoga][PR] Let measure behave more like on the web
Browse files Browse the repository at this point in the history
Differential Revision: D4850458

fbshipit-source-id: 2ecb6c8627a84b52ade968fd18331a7473369ebe
  • Loading branch information
Emil Sjolander authored and Maxime Aoustin committed Apr 19, 2017
1 parent a311d12 commit e25f4fa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ReactCommon/yoga/yoga/Yoga.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,13 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(const YGNodeRef node,
node, YGFlexDirectionRow, availableWidth - marginAxisRow, parentWidth, parentWidth);
node->layout.measuredDimensions[YGDimensionHeight] = YGNodeBoundAxis(
node, YGFlexDirectionColumn, availableHeight - marginAxisColumn, parentHeight, parentWidth);
} else if (innerWidth <= 0.0f || innerHeight <= 0.0f) {
// Don't bother sizing the text if there's no horizontal or vertical
// space.
node->layout.measuredDimensions[YGDimensionWidth] =
YGNodeBoundAxis(node, YGFlexDirectionRow, 0.0f, availableWidth, availableWidth);
node->layout.measuredDimensions[YGDimensionHeight] =
YGNodeBoundAxis(node, YGFlexDirectionColumn, 0.0f, availableHeight, availableWidth);
} else {
// Measure the text under the current constraints.
const YGSize measuredSize =
Expand Down

0 comments on commit e25f4fa

Please sign in to comment.