[Libreoffice-commits] online.git: loleaflet/src
Andrzej Hunt
andrzej.hunt at collabora.com
Mon Oct 26 02:38:29 PDT 2015
loleaflet/src/control/Control.Scroll.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 8ab0b885509298fee61bf3edf61407db870e3155
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Mon Oct 26 10:36:51 2015 +0100
loleaflet: onScrollBy: add support for horizontal scrolling too
diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js
index 315f575..7b4c4d2 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -69,7 +69,12 @@ L.Control.Scroll = L.Control.extend({
if (e.y < 0) {
y = '-=' + Math.abs(e.y);
}
- $('.scroll-container').mCustomScrollbar('scrollTo', [y, '+=0']);
+ e.x *= (-1);
+ var x = '+=' + e.x;
+ if (e.x < 0) {
+ x = '-=' + Math.abs(e.x);
+ }
+ $('.scroll-container').mCustomScrollbar('scrollTo', [y, x]);
},
_onUpdateSize: function (e) {
More information about the Libreoffice-commits
mailing list