From 5be6e90388de27b97b8bcf887bd54597038f53f7 Mon Sep 17 00:00:00 2001 From: Shivam Dave Date: Tue, 1 Sep 2015 11:53:41 -0700 Subject: [PATCH] [Mobile] Clean Up Commented out console calls from gesture pinch/plot classes. Also allowed pan with single finger. --- .../features/plot-reborn/src/directives/MCTPinch.js | 2 +- .../features/plot-reborn/src/directives/MCTPlot.js | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/platform/features/plot-reborn/src/directives/MCTPinch.js b/platform/features/plot-reborn/src/directives/MCTPinch.js index d2c9473bf8..36011c38ae 100644 --- a/platform/features/plot-reborn/src/directives/MCTPinch.js +++ b/platform/features/plot-reborn/src/directives/MCTPinch.js @@ -106,7 +106,7 @@ define( event.preventDefault(); } else if (event.changedTouches.length === 1 || event.touches.length === 1) { - console.log("*PAN CHANGE"); + //console.log("*PAN CHANGE"); touchPosition = trackPosition(event.changedTouches[0]); $scope.$emit('mct:pan:change', { diff --git a/platform/features/plot-reborn/src/directives/MCTPlot.js b/platform/features/plot-reborn/src/directives/MCTPlot.js index 500fcf194d..5a9236dc19 100644 --- a/platform/features/plot-reborn/src/directives/MCTPlot.js +++ b/platform/features/plot-reborn/src/directives/MCTPlot.js @@ -329,7 +329,6 @@ define( } function updateZoom(midpoint, bounds, touches, distance) { - //console.log("ZOOM"); // calculate offset between points. Apply that offset to viewport. var midpointPosition = trackTouchPosition(midpoint, bounds), newMidpointPosition = midpointPosition.positionAsPlotPoint, @@ -349,7 +348,6 @@ define( } function updatePan(touch, bounds) { - //console.log("PAN"); // calculate offset between points. Apply that offset to viewport. var panPosition = trackTouchPosition(touch, bounds), newPanPosition = panPosition.positionAsPlotPoint, @@ -394,21 +392,21 @@ define( if(comparePinchDrag(Math.round(touch.distance), Math.round(firstTouchDistance), Math.round(lastTouchDistance))) { - console.log("PAN"); + //console.log("# PINCH PAN"); updatePan(touch.midpoint, touch.bounds); } else { - console.log("ZOOM"); + //console.log("# PINCH ZOOM"); updateZoom(touch.midpoint, touch.bounds, touch.touches, touch.distance); } lastTouchDistance = touch.distance; } function onPanStart(event, touch) { - //startPan(touch.touch, touch.bounds); + startPan(touch.touch, touch.bounds); } function onPanChange(event, touch) { - //updatePan(touch.touch, touch.bounds); + updatePan(touch.touch, touch.bounds); } function onTouchEnd(event) {