[ReactNative] Fix pixel rounding

Summary:
Too many rounds, we only want/need one.
This commit is contained in:
Zack Gomez 2015-08-13 17:59:50 -07:00
parent bc28a35bda
commit f5d68f6ecb
1 changed files with 4 additions and 4 deletions

View File

@ -133,13 +133,13 @@ static void RCTProcessMetaProps(const float metaProps[META_PROP_COUNT], float st
_layoutLifecycle = RCTUpdateLifecycleComputed;
CGPoint absoluteTopLeft = {
RCTRoundPixelValue(absolutePosition.x + node->layout.position[CSS_LEFT]),
RCTRoundPixelValue(absolutePosition.y + node->layout.position[CSS_TOP])
absolutePosition.x + node->layout.position[CSS_LEFT],
absolutePosition.y + node->layout.position[CSS_TOP]
};
CGPoint absoluteBottomRight = {
RCTRoundPixelValue(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.x + node->layout.position[CSS_LEFT] + node->layout.dimensions[CSS_WIDTH],
absolutePosition.y + node->layout.position[CSS_TOP] + node->layout.dimensions[CSS_HEIGHT]
};
CGRect frame = {{