mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 23:20:50 +00:00
[Mobile] Clean Up
Changed variable placement for amount of distance changed allowed for a pinch drag.
This commit is contained in:
parent
5a9619ce26
commit
50d10639e1
@ -9,7 +9,8 @@ define(
|
|||||||
|
|
||||||
var RANGE_TICK_COUNT = 7,
|
var RANGE_TICK_COUNT = 7,
|
||||||
DOMAIN_TICK_COUNT = 5,
|
DOMAIN_TICK_COUNT = 5,
|
||||||
ZOOM_AMT = 0.02;
|
ZOOM_AMT = 0.02,
|
||||||
|
PINCH_DRAG_AMT = 2;
|
||||||
|
|
||||||
function MCTPlot() {
|
function MCTPlot() {
|
||||||
|
|
||||||
@ -370,13 +371,14 @@ define(
|
|||||||
function onPinchStart(event, touch) {
|
function onPinchStart(event, touch) {
|
||||||
$scope.$emit('user:viewport:change:start');
|
$scope.$emit('user:viewport:change:start');
|
||||||
startZoom(touch.midpoint, touch.bounds, touch.touches, touch.distance);
|
startZoom(touch.midpoint, touch.bounds, touch.touches, touch.distance);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function comparePinchDrag(distance, firstDistance, lastDistance) {
|
function comparePinchDrag(distance, firstDistance, lastDistance) {
|
||||||
var amt = 2;
|
return (((firstDistance + PINCH_DRAG_AMT) >= distance) &&
|
||||||
return (((firstDistance + amt) >= distance) && ((firstDistance - amt) <= distance))
|
((firstDistance - PINCH_DRAG_AMT) <= distance)) ||
|
||||||
|| (((lastDistance + amt) >= distance) && ((lastDistance - amt) <= distance));
|
(((lastDistance + PINCH_DRAG_AMT) >= distance) &&
|
||||||
|
((lastDistance - PINCH_DRAG_AMT) <= distance));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPinchChange(event, touch) {
|
function onPinchChange(event, touch) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user