diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2020-09-15 11:02:54 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-09-15 11:02:54 +0100 |
commit | 9a558124440ccd0a51e964647150d79a2c03525b (patch) | |
tree | 704b735f71f84aae07d5690cab282d4366a77f67 | |
parent | 693c60eebf1cc285e5b9ff8941207efedd898c3c (diff) |
calc grid: fix this interleaving.
When the span starts in the middle of the view don't render backwards.
Change-Id: Icc97fef88a65c0ca83167ddb72c03bece9a8e047
-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 7cf1318a7..2c08e2faa 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -1839,8 +1839,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) { |