loleaflet/src/core/Socket.js | 7 +++++-- loleaflet/src/map/Map.js | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit 0235fb48bdf11e546e68670fd51998b015c333cb Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Tue Jul 7 14:15:58 2020 +0530 Commit: Dennis Francis <dennis.fran...@collabora.com> CommitDate: Wed Jul 8 16:54:48 2020 +0200 disable background layer for grids when using CanvasTileLayer Change-Id: I6c852758b60c04a11c2ac4133cdf78903aff1d48 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98353 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index b4f918da7..1f2dcf047 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -952,8 +952,11 @@ L.Socket = L.Class.extend({ tileHeightTwips: tileHeightTwips, docType: command.type }); - if (!this._map.options.backgroundLayer) { - this._map.options.backgroundLayer = new L.CalcBackground().addTo(this._map); + + this._map.options.backgroundLayerEnabled = !(docLayer instanceof L.CanvasTileLayer); + + if (this._map.options.backgroundLayerEnabled) { + docLayer.backgroundLayer = new L.CalcBackground().addTo(this._map); (new L.CalcGridLines()).addTo(this._map); } } diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index b4be77964..97163f1d7 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -41,7 +41,8 @@ L.Map = L.Evented.extend({ tileHeightTwips: window.tileSize * 15, urlPrefix: 'lool', wopiSrc: '', - cursorURL: L.LOUtil.getURL('cursors') + cursorURL: L.LOUtil.getURL('cursors'), + backgroundLayerEnabled: true, }, // Control.UIManager instance, set in main.js _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits