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

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


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

New commits:
commit 31b30936865b672f3015763fb8f6d3705a10a8b3
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Wed May 27 17:30:39 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 16:35:16 2020 +0200

    Handle print-twips 'textviewselection' msg correctly
    
    Change-Id: I94a40b5a53a33a6658a8c8e4cd1cdbbd5ae4f460
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98111
    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 f34ca10a9..f2268776c 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1711,10 +1711,11 @@ 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, bottomRightTwips));
+				rectangles.push([boundsTwips.getBottomLeft(), boundsTwips.getBottomRight(),
+						boundsTwips.getTopLeft(), boundsTwips.getTopRight()]);
 			}
 
 			this._viewSelections[viewId].part = viewPart;


More information about the Libreoffice-commits mailing list