Set stretch to mean exact measurement

This commit is contained in:
Emil Sjölander
2018-11-24 15:41:58 +00:00
parent 0a314012f4
commit 58af41b546

View File

@@ -1371,6 +1371,16 @@ static void YGNodeComputeFlexBasisForChild(
auto marginColumn = YGUnwrapFloatOptional(
child->getMarginForAxis(YGFlexDirectionColumn, ownerWidth));
if (YGNodeAlignItem(node, child) == YGAlignStretch) {
if (isMainAxisRow && !YGFloatIsUndefined(height)) {
childHeight = height;
childHeightMeasureMode = YGMeasureModeExactly;
} else if (!isMainAxisRow && !YGFloatIsUndefined(width)) {
childWidth = width;
childWidthMeasureMode = YGMeasureModeExactly;
}
}
if (isRowStyleDimDefined) {
childWidth =
YGUnwrapFloatOptional(YGResolveValue(