Fix aspect ratio when stretching with main axis margin #834
@@ -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(
|
||||
|
Reference in New Issue
Block a user