Rename onceDatalayersDataLoaded to onceDataLoaded
This commit is contained in:
parent
ccf2c1b4fe
commit
c18dd863ce
2 changed files with 7 additions and 7 deletions
|
@ -209,7 +209,7 @@ L.U.Map.include({
|
||||||
if (this.options.onLoadPanel === 'databrowser') this.openBrowser();
|
if (this.options.onLoadPanel === 'databrowser') this.openBrowser();
|
||||||
else if (this.options.onLoadPanel === 'caption') this.displayCaption();
|
else if (this.options.onLoadPanel === 'caption') this.displayCaption();
|
||||||
});
|
});
|
||||||
this.onceDatalayersDataLoaded(function () {
|
this.onceDataLoaded(function () {
|
||||||
const slug = L.Util.queryString('feature');
|
const slug = L.Util.queryString('feature');
|
||||||
if (slug && this.features_index[slug]) this.features_index[slug].view();
|
if (slug && this.features_index[slug]) this.features_index[slug].view();
|
||||||
});
|
});
|
||||||
|
@ -309,8 +309,8 @@ L.U.Map.include({
|
||||||
if (toload === 0) loaded();
|
if (toload === 0) loaded();
|
||||||
};
|
};
|
||||||
var dataLoaded = function () {
|
var dataLoaded = function () {
|
||||||
self.datalayersDataLoaded = true;
|
self.dataLoaded = true;
|
||||||
self.fire('datalayersdataloaded');
|
self.fire('dataloaded');
|
||||||
};
|
};
|
||||||
var decrementDataToLoad = function () {
|
var decrementDataToLoad = function () {
|
||||||
dataToload--;
|
dataToload--;
|
||||||
|
@ -354,12 +354,12 @@ L.U.Map.include({
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
onceDatalayersDataLoaded: function (callback, context) {
|
onceDataLoaded: function (callback, context) {
|
||||||
// Once datalayers **data** have been loaded
|
// Once datalayers **data** have been loaded
|
||||||
if (this.datalayersDataLoaded) {
|
if (this.dataLoaded) {
|
||||||
callback.call(context || this, this);
|
callback.call(context || this, this);
|
||||||
} else {
|
} else {
|
||||||
this.once('datalayersdataloaded', callback, context);
|
this.once('dataloaded', callback, context);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,7 +46,7 @@ L.U.Slideshow = L.Class.extend({
|
||||||
// Certainly IE8, which has a limited version of defineProperty
|
// Certainly IE8, which has a limited version of defineProperty
|
||||||
}
|
}
|
||||||
if (this.options.autoplay) {
|
if (this.options.autoplay) {
|
||||||
this.map.onceDatalayersDataLoaded(function () {
|
this.map.onceDataLoaded(function () {
|
||||||
this.play();
|
this.play();
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue