From a876b234c6473fdabfef9b1ff728cd7e8ff62a52 Mon Sep 17 00:00:00 2001 From: Andrei Coman Date: Tue, 6 Oct 2015 11:36:42 -0700 Subject: [PATCH] Fix element inspector Differential Revision: D2513268 fb-gh-sync-id: c0c91cc96926eb6d222c7cbc8855342e8594a09f --- .../java/com/facebook/react/uimanager/UIManagerModule.java | 4 ++-- .../com/facebook/react/uimanager/UIViewOperationQueue.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index 25b97a863..3df9ce7fb 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -632,8 +632,8 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements final Callback callback) { mOperationsQueue.enqueueFindTargetForTouch( reactTag, - point.getInt(0), - point.getInt(1), + Math.round(PixelUtil.toPixelFromDIP(point.getDouble(0))), + Math.round(PixelUtil.toPixelFromDIP(point.getDouble(1))), callback); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java index 60891ae2d..001cf080d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java @@ -17,8 +17,8 @@ import java.util.ArrayList; import com.facebook.react.animation.Animation; import com.facebook.react.animation.AnimationRegistry; import com.facebook.react.bridge.Callback; -import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReadableArray; import com.facebook.systrace.Systrace; import com.facebook.systrace.SystraceMessage; @@ -385,8 +385,8 @@ public class UIViewOperationQueue { final int touchTargetReactTag = mNativeViewHierarchyManager.findTargetTagForTouch( mReactTag, - PixelUtil.toPixelFromDIP(mTargetX) + containerX, - PixelUtil.toPixelFromDIP(mTargetY) + containerY); + mTargetX + containerX, + mTargetY + containerY); try { mNativeViewHierarchyManager.measure(