loleaflet/src/layer/tile/TileLayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 45b923cb2eedaee3430d6d1f34d5ce7157dd0b36 Author: Aditya Dewan <[email protected]> Date: Thu May 18 14:12:42 2017 +0530 tdf#107891 zoom does not reset on window resize Change-Id: I799d2517496233e6ec04587c257eeada56769aca Reviewed-on: https://gerrit.libreoffice.org/37747 Reviewed-by: pranavk <[email protected]> Tested-by: pranavk <[email protected]> diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 8611d3d6..109569ce 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1834,7 +1834,7 @@ L.TileLayer = L.GridLayer.extend({ _fitWidthZoom: function (e, maxZoom) { var size = e ? e.newSize : this._map.getSize(); var widthTwips = size.x * this._map.options.tileWidthTwips / this._tileSize; - maxZoom = maxZoom ? maxZoom : this._map.options.zoom; + maxZoom = maxZoom ? maxZoom : this._map.getZoom(); // 'fit width zoom' has no use in spreadsheets, ignore it there if (this._docType !== 'spreadsheet') { @@ -1842,7 +1842,7 @@ L.TileLayer = L.GridLayer.extend({ if (this._docWidthTwips > 0) { var ratio = widthTwips / this._docWidthTwips; - var zoom = this._map.options.zoom + Math.floor(Math.log(ratio) / Math.log(crsScale)); + var zoom = this._map.getZoom() + Math.floor(Math.log(ratio) / Math.log(crsScale)); zoom = Math.max(1, zoom); zoom = Math.min(maxZoom, zoom); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
