Prevent old style slideshow to be actived on load

We used to only consider the delay to define if the slideshow was
active or not.
This commit is contained in:
Yohan Boniface 2020-03-22 15:40:52 +01:00
parent 27a4fd7dc2
commit 24baed0c1a

View file

@ -90,7 +90,7 @@ L.U.Slideshow = L.Class.extend({
play: function () { play: function () {
if (this._id) return; if (this._id) return;
if (this.map.editEnabled) return; if (this.map.editEnabled || !this.map.options.slideshow.active) return;
L.DomUtil.addClass(document.body, L.U.Slideshow.CLASSNAME); L.DomUtil.addClass(document.body, L.U.Slideshow.CLASSNAME);
this._id = window.setInterval(L.bind(this.loop, this), this.options.delay); this._id = window.setInterval(L.bind(this.loop, this), this.options.delay);
this.resetSpinners(); this.resetSpinners();