loleaflet/src/core/Socket.js          |    3 +--
 loleaflet/src/layer/tile/GridLayer.js |   10 ++++++++++
 loleaflet/src/layer/tile/TileLayer.js |    3 +--
 loleaflet/src/map/Map.js              |    3 +--
 4 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit df2f46dfb0cfd48df5c5b4a9f7b57975785833f8
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Wed Sep 12 21:36:46 2018 +0200
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Tue Sep 18 16:05:57 2018 +0200

    Create a method which invalidates and requests all the tiles
    
    Used after reconnection for example.
    
    Change-Id: Ie9a15ec1fdec71ca8aba7d9b7417b05005c6c69a
    Reviewed-on: https://gerrit.libreoffice.org/60599
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 7e138b511..f36b4d537 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -750,8 +750,7 @@ L.Socket = L.Class.extend({
                                // we are reconnecting ...
                                this._reconnecting = false;
                                this._map._docLayer._resetClientVisArea();
-                               
this._map._docLayer._onMessage('invalidatetiles: EMPTY', null);
-                               this._map._docLayer._update();
+                               this._map._docLayer._requestNewTiles();
                                this._map.fire('statusindicator', {statusType: 
'reconnected'});
                                
this._map.setPermission(this._map.options.permission);
                        }
diff --git a/loleaflet/src/layer/tile/GridLayer.js 
b/loleaflet/src/layer/tile/GridLayer.js
index 3ef87b2d6..a5860a9c0 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -698,6 +698,16 @@ L.GridLayer = L.Layer.extend({
                }
        },
 
+       _requestNewTiles: function () {
+               this._onMessage('invalidatetiles: EMPTY', null);
+               this._update();
+       },
+
+       toggleTileDebugMode: function() {
+               this.toggleTileDebugModeImpl();
+               this._requestNewTiles();
+       },
+
        _sendClientVisibleArea: function (forceUpdate) {
                var visibleTopLeft = 
this._latLngToTwips(this._map.getBounds().getNorthWest());
                var visibleBottomRight = 
this._latLngToTwips(this._map.getBounds().getSouthEast());
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 30d266df0..33b8632c9 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -472,7 +472,7 @@ L.TileLayer = L.GridLayer.extend({
                }
        },
 
-       toggleTileDebugMode: function() {
+       toggleTileDebugModeImpl: function() {
                this._debug = !this._debug;
                if (!this._debug) {
                        map.removeLayer(this._debugInfo);
@@ -486,7 +486,6 @@ L.TileLayer = L.GridLayer.extend({
                        }
                        this._debugInit();
                }
-               this._onMessage('invalidatetiles: EMPTY', null);
        },
 
        _onCommandValuesMsg: function (textMsg) {
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index daa90f9b5..8cc34c7c6 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -846,10 +846,9 @@ L.Map = L.Evented.extend({
                                this._socket.sendMessage('useractive');
                                this._active = true;
                                if (this._doclayer) {
-                                       
this._docLayer._onMessage('invalidatetiles: EMPTY', null);
                                        this._docLayer._clientVisibleArea = '';
                                        this._docLayer._clientZoom = '';
-                                       this._docLayer._update();
+                                       this._docLayer._requestNewTiles();
                                }
 
                                if (vex.dialogID > 0) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to