diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2020-09-11 14:24:37 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-09-15 15:47:44 +0200 |
commit | fa410c77d33b5446af38fb55cc00eb053c0b4324 (patch) | |
tree | f490d8f5e34334afa35acd9950e01b19ef1aae50 | |
parent | cypress: NC: fix writer page orientation test. (diff) | |
download | online-fa410c77d33b5446af38fb55cc00eb053c0b4324.tar.gz online-fa410c77d33b5446af38fb55cc00eb053c0b4324.zip |
scrolling: fixed multitouch horizontal scrolling
Change-Id: I2b30be5bd2d96c4757cd4059a28fb08a702bc3ca
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102447
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | loleaflet/src/map/handler/Map.Scroll.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/loleaflet/src/map/handler/Map.Scroll.js b/loleaflet/src/map/handler/Map.Scroll.js index 9377f2d751..3f088cd230 100644 --- a/loleaflet/src/map/handler/Map.Scroll.js +++ b/loleaflet/src/map/handler/Map.Scroll.js @@ -48,7 +48,10 @@ L.Map.Scroll = L.Handler.extend({ this._timer = setTimeout(L.bind(this._performScroll, this), left); } else { - this._vertical = 1; + if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) + this._vertical = 0; + else + this._vertical = 1; this._timer = setTimeout(L.bind(this._performScroll, this), left); } |