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

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


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

New commits:
commit 72fd12904e5228b4db670ac02d56966e9509e74e
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Wed May 27 12:48:50 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 16:33:07 2020 +0200

    Handle print-twips 'cellselectionarea' msg correctly
    
    Change-Id: Ib8a13f66a4ffd3d63eeff8951960ebf176733a18
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98109
    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 fd92bb468..6c4ede99e 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1858,10 +1858,12 @@ L.TileLayer = L.GridLayer.extend({
 			var topLeftTwips = new L.Point(parseInt(strTwips[0]), parseInt(strTwips[1]));
 			var offset = new L.Point(parseInt(strTwips[2]), parseInt(strTwips[3]));
 			var bottomRightTwips = topLeftTwips.add(offset);
+			var boundsTwips = this._convertToTileTwipsSheetArea(
+					new L.Bounds(topLeftTwips, bottomRightTwips));
 			var oldSelection = this._cellSelectionArea;
 			this._cellSelectionArea = new L.LatLngBounds(
-						this._twipsToLatLng(topLeftTwips, this._map.getZoom()),
-						this._twipsToLatLng(bottomRightTwips, this._map.getZoom()));
+					this._twipsToLatLng(boundsTwips.getTopLeft(), this._map.getZoom()),
+					this._twipsToLatLng(boundsTwips.getBottomRight(), this._map.getZoom()));
 
 			this._updateScrollOnCellSelection(oldSelection, this._cellSelectionArea);
 		} else {


More information about the Libreoffice-commits mailing list