Skip to content

Commit

Permalink
fixes mac os firefox scroll. closes #8595
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrzakovic committed Aug 13, 2021
1 parent 05d0d04 commit 2270b5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/renderer/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,11 @@ export function rendererMap(context) {
x2 = p0[0] - p1[0] * k2;
y2 = p0[1] - p1[1] * k2;

// 2 finger map panning (Mac only, all browsers) - #5492, #5512
// 2 finger map panning (Mac only, all browsers except Firefox #8595) - #5492, #5512
// Panning via the `wheel` event will always have:
// - `ctrlKey = false`
// - `deltaX`,`deltaY` are round integer pixels
} else if (detected.os === 'mac' && !source.ctrlKey && isInteger(dX) && isInteger(dY)) {
} else if (detected.os === 'mac' && detected.browser !== 'Firefox' && !source.ctrlKey && isInteger(dX) && isInteger(dY)) {
p1 = projection.translate();
x2 = p1[0] - dX;
y2 = p1[1] - dY;
Expand Down

0 comments on commit 2270b5d

Please sign in to comment.