mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-23 21:25:13 +08:00
Fix sizing of non strech items
Summary: Fixes the sizing of items so that under most scenarios it calcultes its height by it's content for non exact measurings. This introduces a new useLegacyStretchBehaviour flag on the config to opt out of this change as it is breaking. See facebook/yoga#505 Closes https://github.com/facebook/yoga/pull/506 Reviewed By: astreet Differential Revision: D4954016 Pulled By: emilsjolander fbshipit-source-id: d28bd5d174cd76951fb94df85e3b0cfab7f81ff7
This commit is contained in:
committed by
Facebook Github Bot
parent
99341315c4
commit
992e37c8bc
@@ -87,6 +87,7 @@ public class ReactShadowNode {
|
||||
if (sYogaConfig == null) {
|
||||
sYogaConfig = new YogaConfig();
|
||||
sYogaConfig.setPointScaleFactor(0f);
|
||||
sYogaConfig.setUseLegacyStretchBehaviour(true);
|
||||
}
|
||||
if (node == null) {
|
||||
node = new YogaNode(sYogaConfig);
|
||||
|
||||
Reference in New Issue
Block a user