[Libreoffice-commits] online.git: loleaflet/src

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 5 14:31:59 UTC 2020


 loleaflet/src/layer/tile/TileLayer.js |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e2409e27cad531043719d382542ad143917995db
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Sun May 24 20:34:25 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 16:31:38 2020 +0200

    Handle print-twips referencemarks msg correctly
    
    Change-Id: I53f283e267a5fd84cf3232cc346921b67d3487bc
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98107
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index e0ac093c6..949e8354b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1755,10 +1755,10 @@ L.TileLayer = L.GridLayer.extend({
 				for (var i = 0; i < strTwips.length; i += 4) {
 					var topLeftTwips = new L.Point(parseInt(strTwips[i]), parseInt(strTwips[i + 1]));
 					var offset = new L.Point(parseInt(strTwips[i + 2]), parseInt(strTwips[i + 3]));
-					var topRightTwips = topLeftTwips.add(new L.Point(offset.x, 0));
-					var bottomLeftTwips = topLeftTwips.add(new L.Point(0, offset.y));
-					var bottomRightTwips = topLeftTwips.add(offset);
-					rectangles.push([bottomLeftTwips, bottomRightTwips, topLeftTwips, topRightTwips]);
+					var boundsTwips = this._convertToTileTwipsSheetArea(
+						new L.Bounds(topLeftTwips, topLeftTwips.add(offset)));
+					rectangles.push([boundsTwips.getBottomLeft(), boundsTwips.getBottomRight(),
+						boundsTwips.getTopLeft(), boundsTwips.getTopRight()]);
 				}
 
 				var polygons = L.PolyUtil.rectanglesToPolygons(rectangles, this);


More information about the Libreoffice-commits mailing list