loleaflet/src/layer/tile/TileLayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 8795f66a791ef679993c7a26b446556ff40518eb Author: Aditya Dewan <iit2015...@iiita.ac.in> 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 <pran...@collabora.co.uk> Tested-by: pranavk <pran...@collabora.co.uk> (cherry picked from commit 45b923cb2eedaee3430d6d1f34d5ce7157dd0b36) Reviewed-on: https://gerrit.libreoffice.org/37749 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> 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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits