loleaflet bccu#1524: Ignore fit-width-zoom in spereadsheet.

It has no use there, nobody wants to see a huge spreadsheet zoomed out to fit
the screen.
This commit is contained in:
Jan Holesovsky 2016-03-15 14:00:53 +01:00
parent 213e678193
commit 0e33e3cf5c

View file

@ -1173,8 +1173,9 @@ L.TileLayer = L.GridLayer.extend({
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;
if (this._docType !== 'spreadsheet' || !e) {
// If it's not a spreadsheet or the method has been invoked manually
// 'fit width zoom' has no use in spreadsheets, ignore it there
if (this._docType !== 'spreadsheet') {
var crsScale = this._map.options.crs.scale(1);
if (this._docWidthTwips > 0)
{