Fix wraping calculation if min-size constraint exists

Summary:
Fixes #261
Closes https://github.com/facebook/css-layout/pull/262

Reviewed By: splhack

Differential Revision: D4245200

Pulled By: emilsjolander

fbshipit-source-id: 77d802d71010ed426511d6a01e6de1e7c9194179
This commit is contained in:
Lukas Woehrl 2017-01-16 16:09:43 -08:00 committed by Facebook Github Bot
parent 302d42da7f
commit e93ccfd57a
1 changed files with 3 additions and 2 deletions

View File

@ -1984,8 +1984,9 @@ static void YGNodelayoutImpl(const YGNodeRef node,
child->lineIndex = lineCount;
if (child->style.positionType != YGPositionTypeAbsolute) {
const float outerFlexBasis = child->layout.computedFlexBasis +
YGNodeMarginForAxis(child, mainAxis, availableInnerWidth);
const float outerFlexBasis =
fmaxf(YGValueResolve(&child->style.minDimensions[dim[mainAxis]], mainAxisParentSize), child->layout.computedFlexBasis) +
YGNodeMarginForAxis(child, mainAxis, availableInnerWidth);
// If this is a multi-line flow and this item pushes us over the
// available size, we've