mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: deactivate loader on map fragments
Since 8ddc570e23
we lost the link
request <=> map, so the "dataloading" and "dataload" events are
global to the DOM, so when loading a list of maps, all instances
react to all dataloading events, which makes the list a mess.
I'd prefer to keep this loading indicator per map, but it's much
easier to just hide it, so let's go that way.
This commit is contained in:
parent
8c7ff52f5f
commit
084c674847
1 changed files with 4 additions and 2 deletions
|
@ -62,8 +62,10 @@ U.Map = L.Map.extend({
|
|||
this.editPanel = new U.EditPanel(this)
|
||||
this.fullPanel = new U.FullPanel(this)
|
||||
}
|
||||
L.DomEvent.on(document.body, 'dataloading', (e) => this.fire('dataloading', e))
|
||||
L.DomEvent.on(document.body, 'dataload', (e) => this.fire('dataload', e))
|
||||
if (!this.options.noControl) {
|
||||
L.DomEvent.on(document.body, 'dataloading', (e) => this.fire('dataloading', e))
|
||||
L.DomEvent.on(document.body, 'dataload', (e) => this.fire('dataload', e))
|
||||
}
|
||||
this.server = new U.ServerRequest()
|
||||
this.request = new U.Request()
|
||||
|
||||
|
|
Loading…
Reference in a new issue