From 68be75af094f98c09bc37b54becd65e9378e7ceb Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 15 Jan 2019 14:45:52 -0500 Subject: [PATCH] Assumption about `mozInputSource = 1` was incorrect Removing this conditional allows 2 finger panning on Firefox --- modules/renderer/map.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/renderer/map.js b/modules/renderer/map.js index e5ba177ec..ce7ef6d04 100644 --- a/modules/renderer/map.js +++ b/modules/renderer/map.js @@ -498,14 +498,10 @@ export function rendererMap(context) { // - `ctrlKey = false` // - `deltaX`,`deltaY` are round integer pixels } else if (detected.os === 'mac' && !source.ctrlKey && isInteger(dX) && isInteger(dY)) { - // Firefox will set `mozInputSource = 1` if the event was generated - // by an actual mouse wheel. If we detect this, don't pan.. - if (source.mozInputSource === undefined || source.mozInputSource !== 1) { - p1 = projection.translate(); - x2 = p1[0] - dX; - y2 = p1[1] - dY; - k2 = projection.scale(); - } + p1 = projection.translate(); + x2 = p1[0] - dX; + y2 = p1[1] - dY; + k2 = projection.scale(); } // something changed - replace the event transform