mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-20 14:34:38 +00:00
Remove deprecated which
and change button
to main-button (#8796)
This commit is contained in:
@ -88,7 +88,7 @@ export const Draggable = Evented.extend({
|
||||
return;
|
||||
}
|
||||
|
||||
if (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }
|
||||
if (Draggable._dragging || e.shiftKey || ((e.button !== 0) && !e.touches)) { return; }
|
||||
Draggable._dragging = this; // Prevent dragging multiple objects at once.
|
||||
|
||||
if (this._preventOutline) {
|
||||
|
@ -58,7 +58,7 @@ export const BoxZoom = Handler.extend({
|
||||
},
|
||||
|
||||
_onMouseDown(e) {
|
||||
if (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }
|
||||
if (!e.shiftKey || (e.button !== 0)) { return false; }
|
||||
|
||||
// Clear the deferred resetState if it hasn't executed yet, otherwise it
|
||||
// will interrupt the interaction and orphan a box element in the container.
|
||||
@ -117,7 +117,7 @@ export const BoxZoom = Handler.extend({
|
||||
},
|
||||
|
||||
_onMouseUp(e) {
|
||||
if ((e.which !== 1) && (e.button !== 1)) { return; }
|
||||
if (e.button !== 0) { return; }
|
||||
|
||||
this._finish();
|
||||
|
||||
|
Reference in New Issue
Block a user