mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 12:34:17 +00:00
[ReactNative] Fix pixel rounding
Summary: Too many rounds, we only want/need one.
This commit is contained in:
parent
bc28a35bda
commit
f5d68f6ecb
@ -133,13 +133,13 @@ static void RCTProcessMetaProps(const float metaProps[META_PROP_COUNT], float st
|
|||||||
_layoutLifecycle = RCTUpdateLifecycleComputed;
|
_layoutLifecycle = RCTUpdateLifecycleComputed;
|
||||||
|
|
||||||
CGPoint absoluteTopLeft = {
|
CGPoint absoluteTopLeft = {
|
||||||
RCTRoundPixelValue(absolutePosition.x + node->layout.position[CSS_LEFT]),
|
absolutePosition.x + node->layout.position[CSS_LEFT],
|
||||||
RCTRoundPixelValue(absolutePosition.y + node->layout.position[CSS_TOP])
|
absolutePosition.y + node->layout.position[CSS_TOP]
|
||||||
};
|
};
|
||||||
|
|
||||||
CGPoint absoluteBottomRight = {
|
CGPoint absoluteBottomRight = {
|
||||||
RCTRoundPixelValue(absolutePosition.x + node->layout.position[CSS_LEFT] + node->layout.dimensions[CSS_WIDTH]),
|
absolutePosition.x + node->layout.position[CSS_LEFT] + node->layout.dimensions[CSS_WIDTH],
|
||||||
RCTRoundPixelValue(absolutePosition.y + node->layout.position[CSS_TOP] + node->layout.dimensions[CSS_HEIGHT])
|
absolutePosition.y + node->layout.position[CSS_TOP] + node->layout.dimensions[CSS_HEIGHT]
|
||||||
};
|
};
|
||||||
|
|
||||||
CGRect frame = {{
|
CGRect frame = {{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user