From 05ad12e3d5658ac55090388ce5a113b4eba97135 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Thu, 28 Jan 2016 17:34:12 +0200 Subject: [PATCH] Little stability improvement of doubletap scale. --- OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java b/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java index 7384854d46..e9020afd03 100644 --- a/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java +++ b/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java @@ -108,8 +108,8 @@ public class DoubleTapScaleDetector { int deltaYDown = (int) firstDown.getY() - (int) secondDown.getY(); int squaredDown = deltaXDown * deltaXDown + deltaYDown * deltaYDown; - int deltaXUp = (int) firstDown.getX() - (int) secondDown.getX(); - int deltaYUp = (int) firstDown.getY() - (int) secondDown.getY(); + int deltaXUp = (int) firstUp.getX() - (int) secondDown.getX(); + int deltaYUp = (int) firstUp.getY() - (int) secondDown.getY(); int squaredUp = deltaXUp * deltaXUp + deltaYUp * deltaYUp; return squaredDown < mDoubleTapSlopSquare && squaredUp < mDoubleTapSlopSquare;