diff options
Diffstat (limited to 'loleaflet/src/layer/tile/CalcTileLayer.js')
-rw-r--r-- | loleaflet/src/layer/tile/CalcTileLayer.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 439f0d8cd..ed7ab0d5d 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -1782,8 +1782,10 @@ L.SheetDimension = L.Class.extend({ (spanData.data.sizecore * (spanData.end - spanData.start + 1)); if (spanFirstCorePx < endPix && spanData.data.poscorepx > startPix) { - var firstCorePx = startPix + spanData.data.sizecore - - ((startPix - spanFirstCorePx) % spanData.data.sizecore); + var firstCorePx = Math.max( + spanFirstCorePx, + startPix + spanData.data.sizecore - + ((startPix - spanFirstCorePx) % spanData.data.sizecore)); var lastCorePx = Math.min(endPix, spanData.data.poscorepx); for (var pos = firstCorePx; pos <= lastCorePx; pos += spanData.data.sizecore) { |