[Libreoffice-commits] online.git: Branch 'libreoffice-6-0' - loleaflet/src

Marco Cecchetti marco.cecchetti at collabora.com
Thu Dec 21 10:53:04 UTC 2017


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

New commits:
commit 489f43d1ce9ab4f3224d380c15b75a0288f4d5b1
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Mon Dec 18 21:50:37 2017 +0100

    loleaflet: calc: wrong data in firing of updaterowcolumnheaders event
    
    two fixes:
    
    - wrong data in firing of updaterowcolumnheaders event (messing up
    pg-up/pg-down)
    
    - console error message about invocation of a method for an undefined
    object (annotation.mark)
    
    Change-Id: I4e7d9de38ffe18b477c99147966fd91d7a460841
    Reviewed-on: https://gerrit.libreoffice.org/46744
    Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
    Tested-by: Marco Cecchetti <mrcekets at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/46898
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index a863e4a1..f75cf787 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -211,7 +211,7 @@ L.CalcTileLayer = L.TileLayer.extend({
 			this._map.fire('updaterowcolumnheaders', {x: 0, y: this._map._getTopLeftPoint().y, offset: {x: 0, y: undefined}});
 			this._map._socket.sendMessage('commandvalues command=.uno:ViewAnnotationsPosition');
 		} else if (textMsg.startsWith('invalidateheader: all')) {
-			this._map.fire('updaterowcolumnheaders', {x: this._map._getTopLeftPoint().x, y: this._map._getTopLeftPoint(), offset: {x: undefined, y: undefined}});
+			this._map.fire('updaterowcolumnheaders', {x: this._map._getTopLeftPoint().x, y: this._map._getTopLeftPoint().y, offset: {x: undefined, y: undefined}});
 			this._map._socket.sendMessage('commandvalues command=.uno:ViewAnnotationsPosition');
 		} else {
 			L.TileLayer.prototype._onMessage.call(this, textMsg, img);
@@ -464,7 +464,9 @@ L.CalcTileLayer = L.TileLayer.extend({
 				var annotation = this._annotations[comment.tab][comment.id];
 				if (annotation) {
 					annotation.setLatLngBounds(comment.cellPos);
-					annotation.mark.setLatLng(comment.cellPos.getNorthEast());
+					if (annotation.mark) {
+						annotation.mark.setLatLng(comment.cellPos.getNorthEast());
+					}
 				}
 			}
 			this.showAnnotations();


More information about the Libreoffice-commits mailing list