From c8ca1deb9b321ca5a51c53a11b43e83b02084712 Mon Sep 17 00:00:00 2001 From: Shivam Dave Date: Tue, 1 Sep 2015 12:15:48 -0700 Subject: [PATCH] [Mobile] Gestures Fixed the range of values for differentiating between pan and pinch zoom to not assign the +2/-2 value to the variable. --- platform/features/plot-reborn/src/directives/MCTPlot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/features/plot-reborn/src/directives/MCTPlot.js b/platform/features/plot-reborn/src/directives/MCTPlot.js index 5a9236dc19..e7aee1cdb9 100644 --- a/platform/features/plot-reborn/src/directives/MCTPlot.js +++ b/platform/features/plot-reborn/src/directives/MCTPlot.js @@ -383,12 +383,12 @@ define( function comparePinchDrag(distance, firstDistance, lastDistance) { var amt = 2; - return (((firstDistance += amt) >= distance) && ((firstDistance -= amt) <= distance)) - || (((lastDistance += amt) >= distance) && ((lastDistance -= amt) <= distance)); + return (((firstDistance + amt) >= distance) && ((firstDistance - amt) <= distance)) + || (((lastDistance + amt) >= distance) && ((lastDistance - amt) <= distance)); } function onPinchChange(event, touch) { - //console.log(Math.round(touch.distance)); + console.log(Math.round(touch.distance)); if(comparePinchDrag(Math.round(touch.distance), Math.round(firstTouchDistance), Math.round(lastTouchDistance))) {