[Libreoffice-commits] online.git: loleaflet/js loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jan 25 10:23:28 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, 3 insertions(+), 12 deletions(-)

New commits:
commit f028fd58f246d0139b35af8e7f48fed8c4a6173c
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Jan 24 12:55:00 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Jan 25 12:20:01 2019 +0200

    tdf#122359: Un-revert and edit in a attempt to reach a compromise
    
    Change-Id: I0f23c70b3c4a07bae24e490eb8d1a5e56a4ba9ee

diff --git a/loleaflet/js/jquery.mCustomScrollbar.js b/loleaflet/js/jquery.mCustomScrollbar.js
index 442b20504..e242263e2 100644
--- a/loleaflet/js/jquery.mCustomScrollbar.js
+++ b/loleaflet/js/jquery.mCustomScrollbar.js
@@ -2127,8 +2127,7 @@ 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((window.ThisIsAMobileApp && (options.drag || options.timeout===1 || options.calledFromInvalidateCursorMsg==true)) ||
-						   (!window.ThisIsAMobileApp)) {
+						if(!window.ThisIsAMobileApp || options.drag || options.timeout===1 || options.calledFromInvalidateCursorMsg==true){
 							/* 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 e8df36eb8..829ce18ab 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -155,11 +155,7 @@ L.Control.Scroll = L.Control.extend({
 
 	_onScrollTo: function (e) {
 		// triggered by the document (e.g. search result out of the viewing area)
-		if (window.ThisIsAMobileApp) {
-			$('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x], {calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
-		} else {
-			$('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x]);
-		}
+		$('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x], {calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
 	},
 
 	_onScrollBy: function (e) {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index e48f0f178..7c23669ed 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1620,11 +1620,7 @@ L.TileLayer = L.GridLayer.extend({
 			if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) &&
 			    !(this._selectionHandles.end && this._selectionHandles.end.isDragged) &&
 			    !(docLayer._followEditor || docLayer._followUser)) {
-				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});
-				}
+				this._map.fire('scrollto', {x: center.x, y: center.y, calledFromInvalidateCursorMsg: scroll !== undefined});
 			}
 		}
 


More information about the Libreoffice-commits mailing list