瀏覽代碼

Stop zoom movement on click / touch.

pull/169/merge
Matthew Petroff 8 年之前
父節點
當前提交
844edc9f5e
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. +5
    -4
      src/js/pannellum.js

+ 5
- 4
src/js/pannellum.js 查看文件

@@ -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…
取消
儲存