[Libreoffice-commits] online.git: loleaflet/src
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Aug 22 05:45:46 UTC 2016
loleaflet/src/layer/tile/TileLayer.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 169fb52a4bc5c427baa672630de5ce920d632664
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Aug 21 11:15:16 2016 -0400
loleaflet: remove view selection when closed
Change-Id: Ia822a00bab13be12e327aee936ed9fb0d3d211b0
Reviewed-on: https://gerrit.libreoffice.org/28303
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 3ff8e0e..4bf102c 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -658,12 +658,17 @@ L.TileLayer = L.GridLayer.extend({
textMsg = textMsg.substring('remview:'.length + 1);
var viewId = parseInt(textMsg);
- // Ignore if viewid is same as ours
+ // Couldn't be ours, now could it?!
if (viewId === this._viewId) {
return;
}
- // Just remove the view and update (to refresh as needed).
+ // Remove selection, if any.
+ if (this._viewSelections[viewId]) {
+ this._viewSelectionsGroup.removeLayer(this._viewSelections[viewId]);
+ }
+
+ // Remove the view and update (to refresh as needed).
if (typeof this._viewCursors[viewId] !== 'undefined') {
this._viewCursors[viewId].visible = false;
this._onUpdateViewCursor(viewId);
More information about the Libreoffice-commits
mailing list