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

@ -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) {

View File

@ -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();