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:
@ -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, {
|
||||||
|
@ -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) {
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user