summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-05-24 22:58:36 +0530
committerDennis Francis <dennis.francis@collabora.com>2020-05-25 00:52:45 +0530
commitaef75914e5f711f98e9489e64223911a6fcae45e (patch)
tree137c22f8f277749ec46878d1ad583b88ebc96ce1
parentHandle print-twips referencemarks msg correctly (diff)
downloadonline-feature/calc-coordinates.tar.gz
online-feature/calc-coordinates.zip
Handle print-twips 'cellviewcursor' msg correctly feature/calc-coordinates
Change-Id: I744a24aa54768f12ea8801f6ceabdd4c79fa483a
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index fde1d47963..e474ebc28d 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1352,9 +1352,11 @@ 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));
this._cellViewCursors[viewId].bounds = 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._cellViewCursors[viewId].part = parseInt(obj.part);