wip: do not sync twice on commit

This commit is contained in:
Yohan Boniface 2024-07-26 13:16:43 +02:00
parent a022619625
commit f80d471203

View file

@ -109,10 +109,9 @@ const FeatureMixin = {
},
onCommit: function () {
this.geometryChanged()
this.geometryChanged(false)
this.feature.onCommit()
},
}
export const LeafletMarker = Marker.extend({
@ -124,9 +123,11 @@ export const LeafletMarker = Marker.extend({
this.setIcon(this.getIcon())
},
geometryChanged: function() {
geometryChanged: function (sync = true) {
this.feature.coordinates = this._latlng
this.feature.sync.update('geometry', this.feature.geometry)
if (sync) {
this.feature.sync.update('geometry', this.feature.geometry)
}
},
addInteractions() {