From d28b269b4c1a53a9936bbb138e694cf934c51729 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 12 Dec 2018 15:45:55 -0500 Subject: [PATCH] Speed up the scrolling on Firefox Linux too (re: #5512) This just changes `detected.os === 'win'` to `detected.os !== 'mac'` --- modules/renderer/map.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/renderer/map.js b/modules/renderer/map.js index 9e97c311d..ce737f891 100644 --- a/modules/renderer/map.js +++ b/modules/renderer/map.js @@ -431,6 +431,7 @@ export function rendererMap(context) { if (source.deltaMode === 1 /* LINE */) { // Convert from lines to pixels, more if the user is scrolling fast. // (I made up the exp function to roughly match Firefox to what Chrome does) + // These numbers should be floats, because integers are treated as pan gesture below. var lines = Math.abs(source.deltaY); var sign = (source.deltaY > 0) ? 1 : -1; dY = sign * clamp( @@ -439,10 +440,10 @@ export function rendererMap(context) { 350.000244140625 // max ); - // On Firefox/Windows we just always get +/- the scroll line amount (default 3) + // On Firefox Windows and Linux we always get +/- the scroll line amount (default 3) // There doesn't seem to be any scroll accelleration. // This multiplier increases the speed a little bit - #5512 - if (detected.os === 'win') { + if (detected.os !== 'mac') { dY *= 5; }