From c18dd863cedc55b3f9c2673ab729859e8654f301 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Sun, 22 Mar 2020 14:38:45 +0100 Subject: [PATCH] Rename onceDatalayersDataLoaded to onceDataLoaded --- umap/static/umap/js/umap.js | 12 ++++++------ umap/static/umap/js/umap.slideshow.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 424bc654..96ce2ebc 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -209,7 +209,7 @@ L.U.Map.include({ if (this.options.onLoadPanel === 'databrowser') this.openBrowser(); else if (this.options.onLoadPanel === 'caption') this.displayCaption(); }); - this.onceDatalayersDataLoaded(function () { + this.onceDataLoaded(function () { const slug = L.Util.queryString('feature'); if (slug && this.features_index[slug]) this.features_index[slug].view(); }); @@ -309,8 +309,8 @@ L.U.Map.include({ if (toload === 0) loaded(); }; var dataLoaded = function () { - self.datalayersDataLoaded = true; - self.fire('datalayersdataloaded'); + self.dataLoaded = true; + self.fire('dataloaded'); }; var decrementDataToLoad = function () { dataToload--; @@ -354,12 +354,12 @@ L.U.Map.include({ return this; }, - onceDatalayersDataLoaded: function (callback, context) { + onceDataLoaded: function (callback, context) { // Once datalayers **data** have been loaded - if (this.datalayersDataLoaded) { + if (this.dataLoaded) { callback.call(context || this, this); } else { - this.once('datalayersdataloaded', callback, context); + this.once('dataloaded', callback, context); } return this; }, diff --git a/umap/static/umap/js/umap.slideshow.js b/umap/static/umap/js/umap.slideshow.js index f7fc7394..35d158dd 100644 --- a/umap/static/umap/js/umap.slideshow.js +++ b/umap/static/umap/js/umap.slideshow.js @@ -46,7 +46,7 @@ L.U.Slideshow = L.Class.extend({ // Certainly IE8, which has a limited version of defineProperty } if (this.options.autoplay) { - this.map.onceDatalayersDataLoaded(function () { + this.map.onceDataLoaded(function () { this.play(); }, this); }