summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2020-09-15 11:02:54 +0100
committerJan Holesovsky <kendy@collabora.com>2020-09-17 21:34:35 +0200
commitb70d9f6c1052ed5a86f309032ed818861027b676 (patch)
tree3b8d46b1838502a747327d040ad6805285f19cab
parent3a93ada13f4030b20601ecd4a345b931bf670c0b (diff)
calc grid: fix this interleaving.
When the span starts in the middle of the view don't render backwards. Change-Id: Icc97fef88a65c0ca83167ddb72c03bece9a8e047 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102951 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--loleaflet/src/layer/tile/CalcTileLayer.js6
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) {