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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 5 12:33:08 UTC 2018


 loleaflet/src/layer/tile/GridLayer.js |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 4b5bc1f20203797e1ba9cf0b9e2a81100e3fc174
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Sep 5 14:31:01 2018 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Sep 5 14:31:04 2018 +0200

    Code deduplication and comment
    
    Change-Id: I9deb8771b9ecf338fbafaacc41b0ad934ed287fd

diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js
index f02f00912..215fc166e 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -25,8 +25,7 @@ L.GridLayer = L.Layer.extend({
 	initialize: function (options) {
 		L.setOptions(this, options);
 
-		this._clientZoom = '';
-		this._clientVisibleArea = '';
+		this._resetClientVisArea()
 	},
 
 	onAdd: function () {
@@ -360,6 +359,9 @@ L.GridLayer = L.Layer.extend({
 		this._setZoomTransforms(center, zoom);
 	},
 
+	// These variables indicates the clientvisiblearea sent to the server and stored by the server
+	// We need to reset them when we are reconnecting to the server or reloading a document
+	// because the server needs new data even if the client is unmodified.
 	_resetClientVisArea: function ()  {
 		this._clientZoom = '';
 		this._clientVisibleArea = '';


More information about the Libreoffice-commits mailing list