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:
Michael Schneider 2017-12-28 10:24:25 -08:00 committed by Facebook Github Bot
parent 4d33080f0f
commit d3b41e0da3
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}