Correcting Flex fix within Experimental feature
Reviewed By: emilsjolander Differential Revision: D4915189 fbshipit-source-id: efccee2fe39ed0f474a41dc3250d24c546f3f5d9
This commit is contained in:
parent
bd0f9fbacb
commit
6b0c72fa82
|
@ -2203,9 +2203,11 @@ static void YGNodelayoutImpl(const YGNodeRef node,
|
||||||
availableInnerMainDim = minInnerMainDim;
|
availableInnerMainDim = minInnerMainDim;
|
||||||
} else if (!YGFloatIsUndefined(maxInnerMainDim) && sizeConsumedOnCurrentLine > maxInnerMainDim) {
|
} else if (!YGFloatIsUndefined(maxInnerMainDim) && sizeConsumedOnCurrentLine > maxInnerMainDim) {
|
||||||
availableInnerMainDim = maxInnerMainDim;
|
availableInnerMainDim = maxInnerMainDim;
|
||||||
} else if (YGConfigIsExperimentalFeatureEnabled(node->config, YGExperimentalFeatureMinFlexFix)) {
|
} else if (YGConfigIsExperimentalFeatureEnabled(node->config, YGExperimentalFeatureMinFlexFix) &&
|
||||||
|
(totalFlexGrowFactors == 0 || YGResolveFlexGrow(node) == 0)) {
|
||||||
// TODO: this needs to be moved out of experimental feature, as this is legitimate fix
|
// TODO: this needs to be moved out of experimental feature, as this is legitimate fix
|
||||||
// If the measurement isn't exact, we want to use as little space as possible
|
// If we don't have any children to flex or we can't flex the node itself,
|
||||||
|
// space we've used is all space we need
|
||||||
availableInnerMainDim = sizeConsumedOnCurrentLine;
|
availableInnerMainDim = sizeConsumedOnCurrentLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue