mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-18 12:12:15 +08:00
UIManager.measure() now respects any zoom affected view hierarchy
Reviewed By: mmmulani Differential Revision: D4396422 fbshipit-source-id: 100c7050bdf9e66b8af27df335343f028a2d4148
This commit is contained in:
committed by
Facebook Github Bot
parent
0d78bba7fe
commit
f839b58c20
@@ -1212,15 +1212,15 @@ RCT_EXPORT_METHOD(measure:(nonnull NSNumber *)reactTag
|
||||
// By convention, all coordinates, whether they be touch coordinates, or
|
||||
// measurement coordinates are with respect to the root view.
|
||||
CGRect frame = view.frame;
|
||||
CGPoint pagePoint = [view.superview convertPoint:frame.origin toView:rootView];
|
||||
CGRect globalBounds = [view convertRect:view.bounds toView:rootView];
|
||||
|
||||
callback(@[
|
||||
@(frame.origin.x),
|
||||
@(frame.origin.y),
|
||||
@(frame.size.width),
|
||||
@(frame.size.height),
|
||||
@(pagePoint.x),
|
||||
@(pagePoint.y)
|
||||
@(globalBounds.size.width),
|
||||
@(globalBounds.size.height),
|
||||
@(globalBounds.origin.x),
|
||||
@(globalBounds.origin.y),
|
||||
]);
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user