Set minHeight instead of minWidth for calculating the layout in RCTSurfaceRootShadowView
Summary: Fix calculating layout in `RCTSurfaceRootShadowView` as the `minWidth` is set doubled in `calculateLayoutWithMinimumSize:maximumSize:`. cc shergin Closes https://github.com/facebook/react-native/pull/17203 Differential Revision: D6642437 Pulled By: shergin fbshipit-source-id: 3483c952c9ecf0132182a156b7b916eb1e975424
This commit is contained in:
parent
4d33080f0f
commit
d3b41e0da3
|
@ -50,7 +50,7 @@
|
|||
float availableHeight = isinf(maximimSize.height) ? YGUndefined : maximimSize.height;
|
||||
|
||||
self.minWidth = (YGValue){isinf(minimumSize.width) ? YGUndefined : minimumSize.width, YGUnitPoint};
|
||||
self.minWidth = (YGValue){isinf(minimumSize.height) ? YGUndefined : minimumSize.height, YGUnitPoint};
|
||||
self.minHeight = (YGValue){isinf(minimumSize.height) ? YGUndefined : minimumSize.height, YGUnitPoint};
|
||||
|
||||
YGNodeCalculateLayout(self.yogaNode, availableWidth, availableHeight, _baseDirection);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue