瀏覽代碼

Fix zoom out jerkiness in Chrome (fixes #61).

pull/63/head
Matthew Petroff 9 年之前
父節點
當前提交
2bfce35229
共有 1 個檔案被更改,包括 3 行新增14 行删除
  1. +3
    -14
      src/js/pannellum.js

+ 3
- 14
src/js/pannellum.js 查看文件

@@ -586,26 +586,15 @@ function onDocumentMouseWheel(event) {
if (event.wheelDeltaY) {
// WebKit
setHfov(config.hfov -= event.wheelDeltaY * 0.05);
zoomSpeed = event.wheelDelta < 0 ? 1 : -1;
} else if (event.wheelDelta) {
// Opera / Explorer 9
setHfov(config.hfov -= event.wheelDelta * 0.05);
zoomSpeed = event.wheelDelta < 0 ? 1 : -1;
} else if (event.detail) {
// Firefox
setHfov(config.hfov += event.detail * 1.5);
}
if (event.detail) {
if (event.detail > 0) {
zoomSpeed = 1;
} else {
zoomSpeed = -1;
}
} else {
if (event.detail < 0) {
zoomSpeed = 1;
} else {
zoomSpeed = -1;
}
zoomSpeed = event.detail > 0 ? 1 : -1;
}
animateInit();


Loading…
取消
儲存