From 0a63e02a8c0d458fd3a1da9de76068d41021dda1 Mon Sep 17 00:00:00 2001 From: Wes Johnston Date: Wed, 30 Nov 2011 16:10:22 -0500 Subject: [PATCH] Bug 705505 - Extend panzoom threshold. r=kats --- mobile/android/base/ui/PanZoomController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mobile/android/base/ui/PanZoomController.java b/mobile/android/base/ui/PanZoomController.java index 9ba3de322fb0..d0e580bb75e0 100644 --- a/mobile/android/base/ui/PanZoomController.java +++ b/mobile/android/base/ui/PanZoomController.java @@ -83,8 +83,8 @@ public class PanZoomController // values make the animation more accurate, but slower to plot. private static final int SUBDIVISION_COUNT = 1000; // The distance the user has to pan before we recognize it as such (e.g. to avoid - // 1-pixel pans between the touch-down and touch-up of a click) - private static final float PAN_THRESHOLD = 4.0f; + // 1-pixel pans between the touch-down and touch-up of a click). In units of inches. + private static final float PAN_THRESHOLD = 0.1f; // Angle from axis within which we stay axis-locked private static final double AXIS_LOCK_ANGLE = Math.PI / 6.0; // 30 degrees // The maximum velocity change factor between events, per ms, in %. @@ -179,7 +179,7 @@ public class PanZoomController Log.e(LOGTAG, "Received impossible touch move while in " + mState); return false; case TOUCHING: - if (panDistance(event) < PAN_THRESHOLD) + if (panDistance(event) < PAN_THRESHOLD * GeckoAppShell.getDpi()) return false; // fall through case PANNING_HOLD_LOCKED: