loleaflet/src/layer/tile/TileLayer.js |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 70966240bf83f1853d351de5728a09f51992b959
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Mon Feb 8 21:02:32 2016 +0100

    loleaflet: Trigger the clientvisiblearea message even when resizing.

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index e474e51..8d263e6 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -124,8 +124,9 @@ L.TileLayer = L.GridLayer.extend({
                        'tilepixelheight=' + this.options.tileSize + ' ' +
                        'tiletwipwidth=' + this.options.tileWidthTwips + ' ' +
                        'tiletwipheight=' + this.options.tileHeightTwips;
+
                // Mark visible area as dirty by default.
-               this._clientVisibleArea = true;
+               this._invalidateClientVisibleArea();
        },
 
     onAdd: function (map) {
@@ -158,6 +159,7 @@ L.TileLayer = L.GridLayer.extend({
                        map.on('zoomend', this._onCellCursorShift, this);
                }
                map.on('zoomend', this._updateClientZoom, this);
+               map.on('resize zoomend', this._invalidateClientVisibleArea, 
this);
                map.on('dragstart', this._onDragStart, this);
                map.on('requestloksession', this._onRequestLOKSession, this);
                map.on('error', this._mapOnError, this);
@@ -779,7 +781,7 @@ L.TileLayer = L.GridLayer.extend({
                        var payload = 'clientvisiblearea x=' + 
Math.round(pos.x) + ' y=' + Math.round(pos.y) +
                                ' width=' + Math.round(size.x) + ' height=' + 
Math.round(size.y);
                        this._map._socket.sendMessage(payload);
-                       this._clientVisibleArea = null;
+                       this._clientVisibleArea = false;
                }
                this._map._socket.sendMessage('key type=' + type +
                                ' char=' + charcode + ' key=' + keycode);
@@ -1260,7 +1262,9 @@ L.TileLayer = L.GridLayer.extend({
                        'tilepixelheight=' + this._tileSize + ' ' +
                        'tiletwipwidth=' + this._tileWidthTwips + ' ' +
                        'tiletwipheight=' + this._tileHeightTwips;
-               // Zoom changed, mark visible area as dirty.
+       },
+
+       _invalidateClientVisibleArea: function() {
                this._clientVisibleArea = true;
        }
 });
commit 03bbe395ec1e661233f30573ee8431ee01c022ee
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Mon Feb 8 20:23:38 2016 +0100

    loleaflet: Let 'saveas' produce the 'document cannot be saved' id too (5).

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 397b028..e474e51 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -390,7 +390,7 @@ L.TileLayer = L.GridLayer.extend({
                if (command.errorCmd === 'load') {
                        errorId = 2; // document cannot be loaded
                }
-               else if (command.errorCmd === 'save') {
+               else if (command.errorCmd === 'save' || command.errorCmd === 
'saveas') {
                        errorId = 5; // document cannot be saved
                }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to