mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix(sync): Allow overlays to sync
`this.options.overlay` is now set during `map.initialize()`, which makes it possible to be set by incoming websocket operations.
This commit is contained in:
parent
2fafad714e
commit
059103b66c
1 changed files with 4 additions and 3 deletions
|
@ -207,6 +207,10 @@ U.Map = L.Map.extend({
|
|||
this.editTools = new U.Editable(this)
|
||||
this.renderEditToolbar()
|
||||
}
|
||||
if (!U.Utils.isObject(this.options.overlay)) {
|
||||
this.options.overlay = {}
|
||||
}
|
||||
|
||||
this.initShortcuts()
|
||||
this.onceDataLoaded(function () {
|
||||
const slug = L.Util.queryString('feature')
|
||||
|
@ -1363,9 +1367,6 @@ U.Map = L.Map.extend({
|
|||
},
|
||||
|
||||
_editOverlay: function (container) {
|
||||
if (!U.Utils.isObject(this.options.overlay)) {
|
||||
this.options.overlay = {}
|
||||
}
|
||||
const overlayFields = [
|
||||
[
|
||||
'options.overlay.url_template',
|
||||
|
|
Loading…
Reference in a new issue