mirror of
https://github.com/nasa/openmct.git
synced 2025-05-30 22:24: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();
|
event.preventDefault();
|
||||||
} else if (event.changedTouches.length === 1 ||
|
} else if (event.changedTouches.length === 1 ||
|
||||||
event.touches.length === 1) {
|
event.touches.length === 1) {
|
||||||
console.log("*PAN CHANGE");
|
//console.log("*PAN CHANGE");
|
||||||
touchPosition = trackPosition(event.changedTouches[0]);
|
touchPosition = trackPosition(event.changedTouches[0]);
|
||||||
|
|
||||||
$scope.$emit('mct:pan:change', {
|
$scope.$emit('mct:pan:change', {
|
||||||
|
@ -329,7 +329,6 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateZoom(midpoint, bounds, touches, distance) {
|
function updateZoom(midpoint, bounds, touches, distance) {
|
||||||
//console.log("ZOOM");
|
|
||||||
// calculate offset between points. Apply that offset to viewport.
|
// calculate offset between points. Apply that offset to viewport.
|
||||||
var midpointPosition = trackTouchPosition(midpoint, bounds),
|
var midpointPosition = trackTouchPosition(midpoint, bounds),
|
||||||
newMidpointPosition = midpointPosition.positionAsPlotPoint,
|
newMidpointPosition = midpointPosition.positionAsPlotPoint,
|
||||||
@ -349,7 +348,6 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updatePan(touch, bounds) {
|
function updatePan(touch, bounds) {
|
||||||
//console.log("PAN");
|
|
||||||
// calculate offset between points. Apply that offset to viewport.
|
// calculate offset between points. Apply that offset to viewport.
|
||||||
var panPosition = trackTouchPosition(touch, bounds),
|
var panPosition = trackTouchPosition(touch, bounds),
|
||||||
newPanPosition = panPosition.positionAsPlotPoint,
|
newPanPosition = panPosition.positionAsPlotPoint,
|
||||||
@ -394,21 +392,21 @@ define(
|
|||||||
|
|
||||||
if(comparePinchDrag(Math.round(touch.distance), Math.round(firstTouchDistance),
|
if(comparePinchDrag(Math.round(touch.distance), Math.round(firstTouchDistance),
|
||||||
Math.round(lastTouchDistance))) {
|
Math.round(lastTouchDistance))) {
|
||||||
console.log("PAN");
|
//console.log("# PINCH PAN");
|
||||||
updatePan(touch.midpoint, touch.bounds);
|
updatePan(touch.midpoint, touch.bounds);
|
||||||
} else {
|
} else {
|
||||||
console.log("ZOOM");
|
//console.log("# PINCH ZOOM");
|
||||||
updateZoom(touch.midpoint, touch.bounds, touch.touches, touch.distance);
|
updateZoom(touch.midpoint, touch.bounds, touch.touches, touch.distance);
|
||||||
}
|
}
|
||||||
lastTouchDistance = touch.distance;
|
lastTouchDistance = touch.distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPanStart(event, touch) {
|
function onPanStart(event, touch) {
|
||||||
//startPan(touch.touch, touch.bounds);
|
startPan(touch.touch, touch.bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPanChange(event, touch) {
|
function onPanChange(event, touch) {
|
||||||
//updatePan(touch.touch, touch.bounds);
|
updatePan(touch.touch, touch.bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTouchEnd(event) {
|
function onTouchEnd(event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user