Permalink
Browse files

Fix min/max percentage constraints on measured nodes

Summary:
Fix min/max percentage constraints on measured nodes. Currently we passed in the available size instead of the parent size.
Fixes #611
Closes facebook/yoga#649

Reviewed By: priteshrnandgaonkar

Differential Revision: D6408019

Pulled By: emilsjolander

fbshipit-source-id: 18be5056dbc0dc179970ec231ab8b4e2cdba65c5
  • Loading branch information...
woehrl01 authored and facebook-github-bot committed Nov 30, 2017
1 parent 71b498b commit 4fdaf2de989c039a62681cc1f7a8407ec32b593e
Showing with 4 additions and 4 deletions.
  1. +4 −4 ReactCommon/yoga/yoga/Yoga.cpp
@@ -1592,17 +1592,17 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(const YGNodeRef node,
widthMeasureMode == YGMeasureModeAtMost)
? measuredSize.width + paddingAndBorderAxisRow
: availableWidth - marginAxisRow,
availableWidth,
availableWidth);
parentWidth,
parentWidth);
node->layout.measuredDimensions[YGDimensionHeight] =
YGNodeBoundAxis(node,
YGFlexDirectionColumn,
(heightMeasureMode == YGMeasureModeUndefined ||
heightMeasureMode == YGMeasureModeAtMost)
? measuredSize.height + paddingAndBorderAxisColumn
: availableHeight - marginAxisColumn,
availableHeight,
availableWidth);
parentHeight,
parentWidth);
}
}

0 comments on commit 4fdaf2d

Please sign in to comment.