From 0d1716d7964491ae894b58ef006cda9dd07d078f Mon Sep 17 00:00:00 2001 From: Szunti Date: Fri, 6 Mar 2015 20:25:04 +0100 Subject: [PATCH] e.button === 0 is the left mouse button. --- src/dom/Draggable.js | 2 +- src/map/handler/Map.BoxZoom.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dom/Draggable.js b/src/dom/Draggable.js index 670c8a54..412004ab 100644 --- a/src/dom/Draggable.js +++ b/src/dom/Draggable.js @@ -46,7 +46,7 @@ L.Draggable = L.Evented.extend({ _onDown: function (e) { this._moved = false; - if (e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; } + if (e.shiftKey || ((e.which !== 1) && (e.button !== 0) && !e.touches)) { return; } L.DomEvent.stopPropagation(e); diff --git a/src/map/handler/Map.BoxZoom.js b/src/map/handler/Map.BoxZoom.js index dff50690..d94478b5 100644 --- a/src/map/handler/Map.BoxZoom.js +++ b/src/map/handler/Map.BoxZoom.js @@ -27,7 +27,7 @@ L.Map.BoxZoom = L.Handler.extend({ }, _onMouseDown: function (e) { - if (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; } + if (!e.shiftKey || ((e.which !== 1) && (e.button !== 0))) { return false; } this._moved = false; @@ -83,7 +83,7 @@ L.Map.BoxZoom = L.Handler.extend({ }, _onMouseUp: function (e) { - if ((e.which !== 1) && (e.button !== 1)) { return; } + if ((e.which !== 1) && (e.button !== 0)) { return; } this._finish();