mirror of
https://github.com/nasa/openmct.git
synced 2025-05-28 05:04:18 +00:00
[Mobile] Clean Up
Commented out console calls from gesture pinch/plot classes. Also allowed pan with single finger.
This commit is contained in:
parent
814b04858a
commit
5be6e90388
@ -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', {
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user