[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/src

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 15 10:03:48 UTC 2020


 loleaflet/src/layer/tile/CalcTileLayer.js |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 9a558124440ccd0a51e964647150d79a2c03525b
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Tue Sep 15 11:02:54 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Sep 15 11:02:54 2020 +0100

    calc grid: fix this interleaving.
    
    When the span starts in the middle of the view don't render backwards.
    
    Change-Id: Icc97fef88a65c0ca83167ddb72c03bece9a8e047

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) {


More information about the Libreoffice-commits mailing list