From 0ee330379136df2714c6550c9008ae4360d53eb9 Mon Sep 17 00:00:00 2001 From: Ivan Persidskiy Date: Fri, 28 Apr 2017 03:04:59 -0700 Subject: [PATCH] Configure YogaKit with main screen scale factor Summary: Hi! After merging https://github.com/facebook/yoga/commit/3db38f2a80cd331bb757eba65baa2d10c9b41f39 the rounding algorithm become broken in YogaKit because it doesn't configure scale factor. Closes https://github.com/facebook/yoga/pull/534 Differential Revision: D4969481 Pulled By: emilsjolander fbshipit-source-id: 57ea42a3b1f37007b2392cda724d509e0b28c4cb --- YogaKit/Source/YGLayout.m | 1 + 1 file changed, 1 insertion(+) diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YGLayout.m index 9010852d..fbbb421b 100644 --- a/YogaKit/Source/YGLayout.m +++ b/YogaKit/Source/YGLayout.m @@ -103,6 +103,7 @@ static YGConfigRef globalConfig; { globalConfig = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(globalConfig, YGExperimentalFeatureWebFlexBasis, true); + YGConfigSetPointScaleFactor(globalConfig, [UIScreen mainScreen].scale); } - (instancetype)initWithView:(UIView*)view