Only zoom sidebar globe if mouse button is pressed down
This commit is contained in:
parent
2e74b73ba0
commit
09413f5fc7
2 changed files with 3 additions and 3 deletions
|
@ -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 ---- */
|
||||
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue