Skip to content

Commit

Permalink
Fix wraping calculation if min-size constraint exists
Browse files Browse the repository at this point in the history
Summary:
Fixes facebook#261
Closes facebook/yoga#262

Reviewed By: splhack

Differential Revision: D4245200

Pulled By: emilsjolander

fbshipit-source-id: 77d802d71010ed426511d6a01e6de1e7c9194179
  • Loading branch information
woehrl01 authored and nicktate committed Jan 19, 2017
1 parent 23a6707 commit b650ff1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ReactCommon/yoga/yoga/Yoga.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b650ff1

Please sign in to comment.