Permalink
Browse files

Fix wraping calculation if min-size constraint exists

Summary:
Fixes #261
Closes facebook/yoga#262

Reviewed By: splhack

Differential Revision: D4245200

Pulled By: emilsjolander

fbshipit-source-id: 77d802d71010ed426511d6a01e6de1e7c9194179
  • Loading branch information...
woehrl01 authored and facebook-github-bot committed Jan 17, 2017
1 parent 302d42d commit e93ccfd57aacb4a72356607098aec04dc71ec29c
Showing with 3 additions and 2 deletions.
  1. +3 −2 ReactCommon/yoga/yoga/Yoga.c
@@ -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

0 comments on commit e93ccfd

Please sign in to comment.