mirror of
https://github.com/nasa/openmct.git
synced 2025-04-20 09:01:14 +00:00
[Mobile] Gestures
Ratio used to check if zoom should be in or out now divides lastDistance/distance instead of firstDistance/distance. Therefore by comparing last distance, user is able to zoom in and out on same pinch without removing fingers.
This commit is contained in:
parent
5b95574673
commit
aa4dbf7062
@ -335,7 +335,7 @@ define(
|
||||
newMidpointPosition = midpointPosition.positionAsPlotPoint,
|
||||
newTouchPosition = [trackTouchPosition(touches[0], bounds).positionAsPlotPoint,
|
||||
trackTouchPosition(touches[1], bounds).positionAsPlotPoint],
|
||||
distanceRatio = firstTouchDistance / distance,
|
||||
distanceRatio = lastTouchDistance / distance || firstTouchDistance / distance,
|
||||
newViewport = calculateViewport(newMidpointPosition, newTouchPosition, distanceRatio);
|
||||
|
||||
$scope.viewport = newViewport;
|
||||
|
Loading…
x
Reference in New Issue
Block a user