e.button === 0 is the left mouse button.
This commit is contained in:
parent
bba39b3eba
commit
0d1716d796
@ -46,7 +46,7 @@ L.Draggable = L.Evented.extend({
|
|||||||
_onDown: function (e) {
|
_onDown: function (e) {
|
||||||
this._moved = false;
|
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);
|
L.DomEvent.stopPropagation(e);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ L.Map.BoxZoom = L.Handler.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onMouseDown: function (e) {
|
_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;
|
this._moved = false;
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ L.Map.BoxZoom = L.Handler.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onMouseUp: function (e) {
|
_onMouseUp: function (e) {
|
||||||
if ((e.which !== 1) && (e.button !== 1)) { return; }
|
if ((e.which !== 1) && (e.button !== 0)) { return; }
|
||||||
|
|
||||||
this._finish();
|
this._finish();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user