[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/js loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 24 11:59:27 UTC 2019
loleaflet/js/jquery.mCustomScrollbar.js | 3 ++-
loleaflet/src/control/Control.Scroll.js | 6 +++++-
loleaflet/src/layer/tile/TileLayer.js | 6 +++++-
3 files changed, 12 insertions(+), 3 deletions(-)
New commits:
commit de30424c22434ccfa8f395f45d894668cccfafd8
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Jan 23 17:41:53 2019 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Jan 24 12:05:49 2019 +0100
tdf#122359: Revert e27ae38bebf4b57aa7563357a188e33d0e1e0be8 for non-MOBILEAPP
This will then re-introduce another issue, that the document view
jumps to the caret position when zooming, but that is a less serious
issue.
Change-Id: Iac22f4c2bc753e4311bd6c646c85937ee24b08e5
diff --git a/loleaflet/js/jquery.mCustomScrollbar.js b/loleaflet/js/jquery.mCustomScrollbar.js
index a0d2d325e..442b20504 100644
--- a/loleaflet/js/jquery.mCustomScrollbar.js
+++ b/loleaflet/js/jquery.mCustomScrollbar.js
@@ -2127,7 +2127,8 @@ and dependencies (minified).
// hidden part of the document (for instance when pressing enter on the
// last visible line). The options.timeout==1 is a silly way to detect
// the mouse-wheel scrolling.
- if(options.drag || options.timeout===1 || options.calledFromInvalidateCursorMsg==true){
+ if((window.ThisIsAMobileApp && (options.drag || options.timeout===1 || options.calledFromInvalidateCursorMsg==true)) ||
+ (!window.ThisIsAMobileApp)) {
/* callbacks: whileScrolling */
if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);}
}
diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js
index 829ce18ab..e8df36eb8 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -155,7 +155,11 @@ L.Control.Scroll = L.Control.extend({
_onScrollTo: function (e) {
// triggered by the document (e.g. search result out of the viewing area)
- $('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x], {calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
+ if (window.ThisIsAMobileApp) {
+ $('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x], {calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
+ } else {
+ $('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x]);
+ }
},
_onScrollBy: function (e) {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 7c23669ed..e48f0f178 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1620,7 +1620,11 @@ L.TileLayer = L.GridLayer.extend({
if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) &&
!(this._selectionHandles.end && this._selectionHandles.end.isDragged) &&
!(docLayer._followEditor || docLayer._followUser)) {
- this._map.fire('scrollto', {x: center.x, y: center.y, calledFromInvalidateCursorMsg: scroll !== undefined});
+ if (window.ThisIsAMobileApp) {
+ this._map.fire('scrollto', {x: center.x, y: center.y, calledFromInvalidateCursorMsg: scroll !== undefined});
+ } else {
+ this._map.fire('scrollto', {x: center.x, y: center.y});
+ }
}
}
More information about the Libreoffice-commits
mailing list