Permalink
Browse files

Set minHeight instead of minWidth for calculating the layout in RCTSu…

…rfaceRootShadowView

Summary:
Fix calculating layout in `RCTSurfaceRootShadowView` as the `minWidth` is set doubled in `calculateLayoutWithMinimumSize:maximumSize:`.

cc shergin
Closes #17203

Differential Revision: D6642437

Pulled By: shergin

fbshipit-source-id: 3483c952c9ecf0132182a156b7b916eb1e975424
  • Loading branch information...
maicki authored and facebook-github-bot committed Dec 28, 2017
1 parent 4d33080 commit d3b41e0da37c08ab0637d9f70d612e50b6f5e63c
Showing with 1 addition and 1 deletion.
  1. +1 −1 React/Base/Surface/RCTSurfaceRootShadowView.m
@@ -50,7 +50,7 @@ - (void)calculateLayoutWithMinimumSize:(CGSize)minimumSize maximumSize:(CGSize)m
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);
}

0 comments on commit d3b41e0

Please sign in to comment.