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:
Alexis Métaireau 2024-05-09 16:35:33 +02:00
parent 2fafad714e
commit 059103b66c

View file

@ -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',