Fix aspect ratio when stretching with main axis margin #834
@@ -1371,6 +1371,16 @@ static void YGNodeComputeFlexBasisForChild(
|
|||||||
auto marginColumn = YGUnwrapFloatOptional(
|
auto marginColumn = YGUnwrapFloatOptional(
|
||||||
child->getMarginForAxis(YGFlexDirectionColumn, ownerWidth));
|
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) {
|
if (isRowStyleDimDefined) {
|
||||||
childWidth =
|
childWidth =
|
||||||
YGUnwrapFloatOptional(YGResolveValue(
|
YGUnwrapFloatOptional(YGResolveValue(
|
||||||
|
Reference in New Issue
Block a user