Remove deprecated which and change button to main-button (#8796)

This commit is contained in:
Florian Bischof
2023-01-13 23:04:29 +01:00
committed by GitHub
parent 8137047515
commit 7e2019b21c
3 changed files with 4 additions and 4 deletions

View File

@ -157,7 +157,7 @@ describe('Map.TouchZoom', () => {
.down().moveBy(-200, 0, 500).up(100); .down().moveBy(-200, 0, 500).up(100);
}); });
it.skipIfNotTouch("Layer is rendered correctly while pinch zoom when zoomAnim is true", (done) => { it.skipIfNotTouch('Layer is rendered correctly while pinch zoom when zoomAnim is true', (done) => {
map.remove(); map.remove();
map = new L.Map(container, { map = new L.Map(container, {

View File

@ -88,7 +88,7 @@ export const Draggable = Evented.extend({
return; 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. Draggable._dragging = this; // Prevent dragging multiple objects at once.
if (this._preventOutline) { if (this._preventOutline) {

View File

@ -58,7 +58,7 @@ export const BoxZoom = Handler.extend({
}, },
_onMouseDown(e) { _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 // Clear the deferred resetState if it hasn't executed yet, otherwise it
// will interrupt the interaction and orphan a box element in the container. // will interrupt the interaction and orphan a box element in the container.
@ -117,7 +117,7 @@ export const BoxZoom = Handler.extend({
}, },
_onMouseUp(e) { _onMouseUp(e) {
if ((e.which !== 1) && (e.button !== 1)) { return; } if (e.button !== 0) { return; }
this._finish(); this._finish();