Correcting Flex fix within Experimental feature
Summary: This diff corrects the fix to be limited only to cases when either element itself or all of it's children can't be flexed Reviewed By: emilsjolander Differential Revision: D4915189 fbshipit-source-id: efccee2fe39ed0f474a41dc3250d24c546f3f5d9
This commit is contained in:
committed by
Facebook Github Bot
parent
6be1c2cdb4
commit
cb612bcfbe
@@ -2203,9 +2203,11 @@ static void YGNodelayoutImpl(const YGNodeRef node,
|
||||
availableInnerMainDim = minInnerMainDim;
|
||||
} else if (!YGFloatIsUndefined(maxInnerMainDim) && sizeConsumedOnCurrentLine > 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
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user