loleaflet/src/layer/tile/TileLayer.js |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit dd9aefd5d81839e5c9e2c6b8cc926fcf74380ba6
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Mon Jul 23 14:52:58 2018 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Mon Jul 23 16:06:39 2018 -0400

    loleaflet: mobile: do not zoom out when edits a document
    
    Change-Id: Ic5b78df16c8ac0ccfb7334e6809b58665cd04494

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index f7cee95bd..b53b9b472 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2142,8 +2142,11 @@ L.TileLayer = L.GridLayer.extend({
 
        _fitWidthZoom: function (e, maxZoom) {
                if (isNaN(this._docWidthTwips)) { return; }
-               var size = e ? e.newSize : this._map.getSize();
-               var widthTwips = size.x * this._map.options.tileWidthTwips / 
this._tileSize;
+               var oldSize = e ? e.oldSize : this._map.getSize();
+               var newSize = e ? e.newSize : this._map.getSize();
+               if (newSize.x - oldSize.x === 0) { return; }
+
+               var widthTwips = newSize.x * this._map.options.tileWidthTwips / 
this._tileSize;
                var ratio = widthTwips / this._docWidthTwips;
 
                maxZoom = maxZoom ? maxZoom : this.options.maxZoom;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to