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 https://github.com/facebook/yoga/pull/649 Reviewed By: priteshrnandgaonkar Differential Revision: D6408019 Pulled By: emilsjolander fbshipit-source-id: 18be5056dbc0dc179970ec231ab8b4e2cdba65c5
This commit is contained in:
parent
71b498b082
commit
4fdaf2de98
|
@ -1592,8 +1592,8 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(const YGNodeRef node,
|
|||
widthMeasureMode == YGMeasureModeAtMost)
|
||||
? measuredSize.width + paddingAndBorderAxisRow
|
||||
: availableWidth - marginAxisRow,
|
||||
availableWidth,
|
||||
availableWidth);
|
||||
parentWidth,
|
||||
parentWidth);
|
||||
node->layout.measuredDimensions[YGDimensionHeight] =
|
||||
YGNodeBoundAxis(node,
|
||||
YGFlexDirectionColumn,
|
||||
|
@ -1601,8 +1601,8 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(const YGNodeRef node,
|
|||
heightMeasureMode == YGMeasureModeAtMost)
|
||||
? measuredSize.height + paddingAndBorderAxisColumn
|
||||
: availableHeight - marginAxisColumn,
|
||||
availableHeight,
|
||||
availableWidth);
|
||||
parentHeight,
|
||||
parentWidth);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue