Skip to content

Commit

Permalink
Fix min/max percentage constraints on measured nodes
Browse files Browse the repository at this point in the history
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 4fdaf2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ReactCommon/yoga/yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 4fdaf2d

Please sign in to comment.