mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +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.editTools = new U.Editable(this)
|
||||||
this.renderEditToolbar()
|
this.renderEditToolbar()
|
||||||
}
|
}
|
||||||
|
if (!U.Utils.isObject(this.options.overlay)) {
|
||||||
|
this.options.overlay = {}
|
||||||
|
}
|
||||||
|
|
||||||
this.initShortcuts()
|
this.initShortcuts()
|
||||||
this.onceDataLoaded(function () {
|
this.onceDataLoaded(function () {
|
||||||
const slug = L.Util.queryString('feature')
|
const slug = L.Util.queryString('feature')
|
||||||
|
@ -1363,9 +1367,6 @@ U.Map = L.Map.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_editOverlay: function (container) {
|
_editOverlay: function (container) {
|
||||||
if (!U.Utils.isObject(this.options.overlay)) {
|
|
||||||
this.options.overlay = {}
|
|
||||||
}
|
|
||||||
const overlayFields = [
|
const overlayFields = [
|
||||||
[
|
[
|
||||||
'options.overlay.url_template',
|
'options.overlay.url_template',
|
||||||
|
|
Loading…
Reference in a new issue