mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
refactor(sync): Remove syncUpdateProperties
function.
The function was only used once, so removing it simplified the whole flow.
This commit is contained in:
parent
d3730a99ff
commit
5247bf77d3
1 changed files with 2 additions and 9 deletions
|
@ -25,14 +25,6 @@ U.FeatureMixin = {
|
|||
return this.toGeoJSON().geometry
|
||||
},
|
||||
|
||||
syncUpdatedProperties: function (properties) {
|
||||
// When updating latlng, sync the whole geometry
|
||||
if (properties.includes('latlng')) {
|
||||
const { subject, metadata, engine } = this.getSyncMetadata()
|
||||
engine.update(subject, metadata, 'geometry', this.getGeometry())
|
||||
}
|
||||
},
|
||||
|
||||
syncDelete: function () {
|
||||
let { subject, metadata, engine } = this.getSyncMetadata()
|
||||
engine.delete(subject, metadata)
|
||||
|
@ -652,7 +644,8 @@ U.Marker = L.Marker.extend({
|
|||
function (e) {
|
||||
this.isDirty = true
|
||||
this.edit(e)
|
||||
this.syncUpdatedProperties(['latlng'])
|
||||
const { subject, metadata, engine } = this.getSyncMetadata()
|
||||
engine.update(subject, metadata, 'geometry', this.getGeometry())
|
||||
},
|
||||
this
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue