mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: fix race condition when slideshow is in autostart mode
Given `setViewFromQueryString` is now async, the slideshow may start before it is run and thus it has called `initCaptionBar`, so let's call it directly (and it's not linked to query string, so…)
This commit is contained in:
parent
bf08536c30
commit
a51cc8102f
1 changed files with 1 additions and 1 deletions
|
@ -187,6 +187,7 @@ U.Map = L.Map.extend({
|
|||
}
|
||||
|
||||
this.initShortcuts()
|
||||
if (!this.options.noControl) this.initCaptionBar()
|
||||
this.onceDataLoaded(this.setViewFromQueryString)
|
||||
|
||||
window.onbeforeunload = () => (this.editEnabled && this.isDirty) || null
|
||||
|
@ -303,7 +304,6 @@ U.Map = L.Map.extend({
|
|||
|
||||
setViewFromQueryString: async function () {
|
||||
if (this.options.noControl) return
|
||||
this.initCaptionBar()
|
||||
if (L.Util.queryString('share')) {
|
||||
this.share.open()
|
||||
} else if (this.options.onLoadPanel === 'databrowser') {
|
||||
|
|
Loading…
Reference in a new issue