Only zoom sidebar globe if mouse button is pressed down

This commit is contained in:
shortcutme 2017-10-28 02:40:35 +02:00
parent 2e74b73ba0
commit 09413f5fc7
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 3 additions and 3 deletions

View file

@ -410,6 +410,7 @@ DAT.Globe = function(container, opts) {
}
function onMouseWheel(event) {
if (container.style.cursor != "move") return false;
event.preventDefault();
if (overRenderer) {
if (event.deltaY) {
@ -471,7 +472,6 @@ DAT.Globe = function(container, opts) {
function unload() {
running = false
container.removeEventListener('mousedown', onMouseDown, false);
container.removeEventListener('mousewheel', onMouseWheel, false);
if ('onwheel' in document) {
container.removeEventListener('wheel', onMouseWheel, false);
} else {
@ -526,7 +526,6 @@ DAT.Globe = function(container, opts) {
/* ---- plugins/Sidebar/media-globe/three.min.js ---- */

View file

@ -321,6 +321,7 @@ DAT.Globe = function(container, opts) {
}
function onMouseWheel(event) {
if (container.style.cursor != "move") return false;
event.preventDefault();
if (overRenderer) {
if (event.deltaY) {