mirror of
https://github.com/umap-project/umap.git
synced 2025-05-15 18:21:53 +02:00
Compare commits
No commits in common. "05e3f5ce3d00034d74794c4c1080186ee1d45321" and "d85fc648b1e79a41e52219960d731cdf8a16fb5b" have entirely different histories.
05e3f5ce3d
...
d85fc648b1
6 changed files with 6 additions and 17 deletions
|
@ -329,7 +329,7 @@ class Feature {
|
||||||
}
|
}
|
||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
const value = this.properties[key]
|
const value = this.properties[key]
|
||||||
if (value) return String(value).trim()
|
if (value) return value.trim()
|
||||||
}
|
}
|
||||||
return this.datalayer.getName().trim()
|
return this.datalayer.getName().trim()
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,10 +144,11 @@ export class DataLayer extends ServerStored {
|
||||||
if (fields.includes('options.type')) {
|
if (fields.includes('options.type')) {
|
||||||
this.resetLayer()
|
this.resetLayer()
|
||||||
}
|
}
|
||||||
|
this.hide()
|
||||||
for (const field of fields) {
|
for (const field of fields) {
|
||||||
this.layer.onEdit(field, builder)
|
this.layer.onEdit(field, builder)
|
||||||
}
|
}
|
||||||
this.redraw()
|
this.show()
|
||||||
break
|
break
|
||||||
case 'remote-data':
|
case 'remote-data':
|
||||||
this.fetchRemoteData()
|
this.fetchRemoteData()
|
||||||
|
@ -651,7 +652,8 @@ export class DataLayer extends ServerStored {
|
||||||
|
|
||||||
redraw() {
|
redraw() {
|
||||||
if (!this.isVisible()) return
|
if (!this.isVisible()) return
|
||||||
this.eachFeature((feature) => feature.redraw())
|
this.hide()
|
||||||
|
this.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
edit() {
|
edit() {
|
||||||
|
|
|
@ -269,12 +269,8 @@ export const LeafletMap = BaseMap.extend({
|
||||||
this.renderUI()
|
this.renderUI()
|
||||||
},
|
},
|
||||||
|
|
||||||
pullProperties() {
|
|
||||||
setOptions(this, this._umap.properties)
|
|
||||||
},
|
|
||||||
|
|
||||||
renderUI: function () {
|
renderUI: function () {
|
||||||
this.pullProperties()
|
setOptions(this, this._umap.properties)
|
||||||
if (this.options.scrollWheelZoom) {
|
if (this.options.scrollWheelZoom) {
|
||||||
this.scrollWheelZoom.enable()
|
this.scrollWheelZoom.enable()
|
||||||
this.dragging.enable()
|
this.dragging.enable()
|
||||||
|
|
|
@ -47,7 +47,6 @@ export class MapUpdater extends BaseUpdater {
|
||||||
this.updateObjectValue(this._umap, key, value)
|
this.updateObjectValue(this._umap, key, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
this._umap.onPropertiesUpdated([key])
|
|
||||||
this._umap.render([key])
|
this._umap.render([key])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1329,10 +1329,6 @@ export default class Umap extends ServerStored {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onPropertiesUpdated(fields = []) {
|
|
||||||
this._leafletMap.pullProperties()
|
|
||||||
}
|
|
||||||
|
|
||||||
render(fields = []) {
|
render(fields = []) {
|
||||||
// Propagate will remove the fields it has already
|
// Propagate will remove the fields it has already
|
||||||
// processed
|
// processed
|
||||||
|
|
|
@ -302,10 +302,6 @@ U.TileLayerChooser = L.Control.extend({
|
||||||
if (options?.edit) {
|
if (options?.edit) {
|
||||||
this.map._umap.properties.tilelayer = tilelayer.toJSON()
|
this.map._umap.properties.tilelayer = tilelayer.toJSON()
|
||||||
this.map._umap.isDirty = true
|
this.map._umap.isDirty = true
|
||||||
this.map._umap.sync.update(
|
|
||||||
'properties.tilelayer',
|
|
||||||
this.map._umap.properties.tilelayer
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
this
|
this
|
||||||
|
|
Loading…
Reference in a new issue