Fix justify content with min/max constraint parent
Summary: The min/max inner width shouldn't take the margins into account. Adds a test for both cases. Fixes #664 Closes https://github.com/facebook/yoga/pull/665 Differential Revision: D6407982 Pulled By: emilsjolander fbshipit-source-id: ffa549a06f802263e3b8488e90756aa3f722d52d
This commit is contained in:
parent
05e862d48d
commit
f5becebc07
|
@ -1862,17 +1862,17 @@ static void YGNodelayoutImpl(const YGNodeRef node,
|
|||
|
||||
// STEP 2: DETERMINE AVAILABLE SIZE IN MAIN AND CROSS DIRECTIONS
|
||||
const float minInnerWidth =
|
||||
YGResolveValue(&node->style.minDimensions[YGDimensionWidth], parentWidth) - marginAxisRow -
|
||||
YGResolveValue(&node->style.minDimensions[YGDimensionWidth], parentWidth) -
|
||||
paddingAndBorderAxisRow;
|
||||
const float maxInnerWidth =
|
||||
YGResolveValue(&node->style.maxDimensions[YGDimensionWidth], parentWidth) - marginAxisRow -
|
||||
YGResolveValue(&node->style.maxDimensions[YGDimensionWidth], parentWidth) -
|
||||
paddingAndBorderAxisRow;
|
||||
const float minInnerHeight =
|
||||
YGResolveValue(&node->style.minDimensions[YGDimensionHeight], parentHeight) -
|
||||
marginAxisColumn - paddingAndBorderAxisColumn;
|
||||
paddingAndBorderAxisColumn;
|
||||
const float maxInnerHeight =
|
||||
YGResolveValue(&node->style.maxDimensions[YGDimensionHeight], parentHeight) -
|
||||
marginAxisColumn - paddingAndBorderAxisColumn;
|
||||
paddingAndBorderAxisColumn;
|
||||
const float minInnerMainDim = isMainAxisRow ? minInnerWidth : minInnerHeight;
|
||||
const float maxInnerMainDim = isMainAxisRow ? maxInnerWidth : maxInnerHeight;
|
||||
|
||||
|
|
Loading…
Reference in New Issue