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

Henry Castro hcastro at collabora.com
Wed Nov 16 14:48:19 UTC 2016


 loleaflet/src/control/Control.PartsPreview.js |    2 +-
 loleaflet/src/layer/tile/ImpressTileLayer.js  |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 30531f88f17d65a87b975dc6a87f207ec0a6da04
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed Nov 16 10:46:47 2016 -0400

    loleaflet: update new and last valid slide thumbnails

diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index 14d41dc..059d4ee 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -88,7 +88,7 @@ L.Control.PartsPreview = L.Control.extend({
 	},
 
 	_updatePart: function (e) {
-		if (e.docType === 'presentation') {
+		if (e.docType === 'presentation' && e.part > 0) {
 			this._map.getPreview(e.part, e.part, 180, 180, {autoUpdate: this.options.autoUpdate});
 		}
 	},
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 8a2f70b..07bb75c 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -101,6 +101,7 @@ L.ImpressTileLayer = L.TileLayer.extend({
 		}
 		if (command.part === this._selectedPart &&
 			command.part !== this._lastValidPart) {
+			this._map.fire('updatepart', {part: this._lastValidPart, docType: this._docType});
 			this._lastValidPart = command.part;
 			this._map.fire('updatepart', {part: command.part, docType: this._docType});
 		}


More information about the Libreoffice-commits mailing list