loleaflet/src/layer/tile/ImpressTileLayer.js | 17 ++++++++++++++++- loleaflet/src/map/Map.js | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-)
New commits: commit dc0001e92f5930babf6a32bfe9a6033f474e6298 Author: Henry Castro <hcas...@collabora.com> Date: Sat Jan 20 17:39:55 2018 -0400 loleaflet: impress: ensure to remove the layer annotation items Change-Id: I660686c193f367ba22278fb2d1c8b2525572c3e0 diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index 0917f9ab..abad6a79 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -183,6 +183,21 @@ L.ImpressTileLayer = L.TileLayer.extend({ } }, + clearAnnotations: function () { + var annotation; + var annotations; + for (var key in this._annotations) { + annotations = this._annotations[key]; + while (annotations.length > 0) { + annotation = annotations.pop(); + if (annotation) { + this._map.removeLayer(annotation); + } + } + } + this._annotations = {}; + }, + removeAnnotation: function (id) { var annotations = this._annotations[this._partHashes[this._selectedPart]]; for (var index in annotations) { @@ -279,7 +294,7 @@ L.ImpressTileLayer = L.TileLayer.extend({ } if (values.comments) { - this._annotations = {}; + this.clearAnnotations(); for (var index in values.comments) { var comment = values.comments[index]; if (!this._annotations[comment.parthash]) { diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 9020f160..6c761b98 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -850,7 +850,7 @@ L.Map = L.Evented.extend({ console.debug('sending useractive'); this._socket.sendMessage('useractive'); this._active = true; - if (this._doclayer) { + if (this._docLayer) { this._docLayer._onMessage('invalidatetiles: EMPTY', null); } if (vex.dialogID > 0) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits