Browse Source

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

pull/63/head
Matthew Petroff 9 years ago
parent
commit
2bfce35229
1 changed files with 3 additions and 14 deletions
  1. +3
    -14
      src/js/pannellum.js

+ 3
- 14
src/js/pannellum.js View File

@@ -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…
Cancel
Save