Browse Source

Stop zoom movement on click / touch.

pull/169/merge
Matthew Petroff 8 years ago
parent
commit
844edc9f5e
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      src/js/pannellum.js

+ 5
- 4
src/js/pannellum.js View File

@@ -596,7 +596,9 @@ function onDocumentMouseDown(event) {

window.removeEventListener('deviceorientation', orientationListener);
config.roll = 0;

zoomSpeed = 0;

isUserInteracting = true;
latestInteraction = Date.now();
@@ -692,6 +694,8 @@ function onDocumentTouchStart(event) {
window.removeEventListener('deviceorientation', orientationListener);
config.roll = 0;

zoomSpeed = 0;

// Calculate touch position relative to top left of viewer container
var pos0 = mousePosition(event.targetTouches[0]);

@@ -787,9 +791,6 @@ function onDocumentPointerDown(event) {
event.targetTouches = pointerCoordinates;
onDocumentTouchStart(event);
event.preventDefault();

window.removeEventListener('deviceorientation', orientationListener);
config.roll = 0;
}
}



Loading…
Cancel
Save