Enabling round-to-pixel Yoga feature for RN (iOS)
Summary: This change enables built-in Yoga mechanism which rounds producing layout metrics to closest "pixel" values. See previous diff for more context. Reviewed By: fkgozali Differential Revision: D6889762 fbshipit-source-id: bc2eea44704db4b377e2e14fab9f67be8c935719
This commit is contained in:
parent
ceb1d1ca5b
commit
114c258045
Binary file not shown.
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Binary file not shown.
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Binary file not shown.
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
@ -50,8 +50,7 @@ typedef NS_ENUM(unsigned int, meta_prop_t) {
|
|||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
yogaConfig = YGConfigNew();
|
||||
// Turnig off pixel rounding.
|
||||
YGConfigSetPointScaleFactor(yogaConfig, 0.0);
|
||||
YGConfigSetPointScaleFactor(yogaConfig, RCTScreenScale());
|
||||
YGConfigSetUseLegacyStretchBehaviour(yogaConfig, true);
|
||||
});
|
||||
return yogaConfig;
|
||||
|
|
Loading…
Reference in New Issue