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

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


 loleaflet/src/layer/tile/CalcTileLayer.js |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 7b78a2e66470969f7daba9846b55b30eda311c0c
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Thu May 21 12:29:52 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 16:24:27 2020 +0200

    Ignore the "invalidateheader:" msgs when...
    
    sheet-geometry data source is enabled, because these messages are not
    just for sheet geometry changes.
    
    Change-Id: I8b2cca968a189607e46a4f9512c60e4b29f124bc
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98098
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index ff75e6b99..3e6453e26 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -269,15 +269,15 @@ L.CalcTileLayer = L.TileLayer.extend({
 			}
 		} else if (textMsg.startsWith('invalidateheader: column')) {
 			this.refreshViewData({x: this._map._getTopLeftPoint().x, y: 0,
-				offset: {x: undefined, y: 0}});
+				offset: {x: undefined, y: 0}}, true /* compatDataSrcOnly */);
 			this._map._socket.sendMessage('commandvalues command=.uno:ViewAnnotationsPosition');
 		} else if (textMsg.startsWith('invalidateheader: row')) {
 			this.refreshViewData({x: 0, y: this._map._getTopLeftPoint().y,
-				offset: {x: 0, y: undefined}});
+				offset: {x: 0, y: undefined}}, true /* compatDataSrcOnly */);
 			this._map._socket.sendMessage('commandvalues command=.uno:ViewAnnotationsPosition');
 		} else if (textMsg.startsWith('invalidateheader: all')) {
 			this.refreshViewData({x: this._map._getTopLeftPoint().x, y: this._map._getTopLeftPoint().y,
-				offset: {x: undefined, y: undefined}});
+				offset: {x: undefined, y: undefined}}, true /* compatDataSrcOnly */);
 			this._map._socket.sendMessage('commandvalues command=.uno:ViewAnnotationsPosition');
 		} else {
 			L.TileLayer.prototype._onMessage.call(this, textMsg, img);
@@ -365,7 +365,7 @@ L.CalcTileLayer = L.TileLayer.extend({
 	_onSetPartMsg: function (textMsg) {
 		var part = parseInt(textMsg.match(/\d+/g)[0]);
 		if (!this.isHiddenPart(part)) {
-			this.refreshViewData(undefined, true /* sheetGeometryChanged */);
+			this.refreshViewData(undefined, false /* compatDataSrcOnly */, true /* sheetGeometryChanged */);
 		}
 	},
 
@@ -467,8 +467,11 @@ L.CalcTileLayer = L.TileLayer.extend({
 	// zooming, cursor moving out of view-area etc.).  Depending on the
 	// active sheet geometry data-source, it may ask core to send current
 	// view area's data or the global data on geometry changes.
-	refreshViewData: function (coordinatesData, sheetGeometryChanged) {
+	refreshViewData: function (coordinatesData, compatDataSrcOnly, sheetGeometryChanged) {
 
+		if (this.options.sheetGeometryDataEnabled && compatDataSrcOnly) {
+			return;
+		}
 		// There are places that call this function with no arguments to indicate that the
 		// command arguments should be the current map area coordinates.
 		if (typeof coordinatesData != 'object') {


More information about the Libreoffice-commits mailing list