Wait for data to be loaded before opening the data browser

We need the map bounds to compute the isOnScreen check
This commit is contained in:
Yohan Boniface 2023-12-14 15:20:59 +01:00
parent 8ce09b039f
commit d93a963e1f

View file

@ -251,7 +251,7 @@ L.U.Map.include({
this.renderEditToolbar() this.renderEditToolbar()
} }
this.initShortcuts() this.initShortcuts()
this.onceDatalayersLoaded(function () { this.onceDataLoaded(function () {
if (L.Util.queryString('share')) this.renderShareBox() if (L.Util.queryString('share')) this.renderShareBox()
else if (this.options.onLoadPanel === 'databrowser') this.openBrowser() else if (this.options.onLoadPanel === 'databrowser') this.openBrowser()
else if (this.options.onLoadPanel === 'caption') this.displayCaption() else if (this.options.onLoadPanel === 'caption') this.displayCaption()