Compare commits

..

No commits in common. "05e3f5ce3d00034d74794c4c1080186ee1d45321" and "d85fc648b1e79a41e52219960d731cdf8a16fb5b" have entirely different histories.

6 changed files with 6 additions and 17 deletions

View file

@ -329,7 +329,7 @@ class Feature {
}
for (const key of keys) {
const value = this.properties[key]
if (value) return String(value).trim()
if (value) return value.trim()
}
return this.datalayer.getName().trim()
}

View file

@ -144,10 +144,11 @@ export class DataLayer extends ServerStored {
if (fields.includes('options.type')) {
this.resetLayer()
}
this.hide()
for (const field of fields) {
this.layer.onEdit(field, builder)
}
this.redraw()
this.show()
break
case 'remote-data':
this.fetchRemoteData()
@ -651,7 +652,8 @@ export class DataLayer extends ServerStored {
redraw() {
if (!this.isVisible()) return
this.eachFeature((feature) => feature.redraw())
this.hide()
this.show()
}
edit() {

View file

@ -269,12 +269,8 @@ export const LeafletMap = BaseMap.extend({
this.renderUI()
},
pullProperties() {
setOptions(this, this._umap.properties)
},
renderUI: function () {
this.pullProperties()
setOptions(this, this._umap.properties)
if (this.options.scrollWheelZoom) {
this.scrollWheelZoom.enable()
this.dragging.enable()

View file

@ -47,7 +47,6 @@ export class MapUpdater extends BaseUpdater {
this.updateObjectValue(this._umap, key, value)
}
this._umap.onPropertiesUpdated([key])
this._umap.render([key])
}
}

View file

@ -1329,10 +1329,6 @@ export default class Umap extends ServerStored {
}
}
onPropertiesUpdated(fields = []) {
this._leafletMap.pullProperties()
}
render(fields = []) {
// Propagate will remove the fields it has already
// processed

View file

@ -302,10 +302,6 @@ U.TileLayerChooser = L.Control.extend({
if (options?.edit) {
this.map._umap.properties.tilelayer = tilelayer.toJSON()
this.map._umap.isDirty = true
this.map._umap.sync.update(
'properties.tilelayer',
this.map._umap.properties.tilelayer
)
}
},
this