mirror of
https://github.com/umap-project/umap.git
synced 2025-05-01 20:42:24 +02:00
wip: do not sync twice on commit
This commit is contained in:
parent
a022619625
commit
f80d471203
1 changed files with 5 additions and 4 deletions
|
@ -109,10 +109,9 @@ const FeatureMixin = {
|
||||||
},
|
},
|
||||||
|
|
||||||
onCommit: function () {
|
onCommit: function () {
|
||||||
this.geometryChanged()
|
this.geometryChanged(false)
|
||||||
this.feature.onCommit()
|
this.feature.onCommit()
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LeafletMarker = Marker.extend({
|
export const LeafletMarker = Marker.extend({
|
||||||
|
@ -124,9 +123,11 @@ export const LeafletMarker = Marker.extend({
|
||||||
this.setIcon(this.getIcon())
|
this.setIcon(this.getIcon())
|
||||||
},
|
},
|
||||||
|
|
||||||
geometryChanged: function() {
|
geometryChanged: function (sync = true) {
|
||||||
this.feature.coordinates = this._latlng
|
this.feature.coordinates = this._latlng
|
||||||
|
if (sync) {
|
||||||
this.feature.sync.update('geometry', this.feature.geometry)
|
this.feature.sync.update('geometry', this.feature.geometry)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addInteractions() {
|
addInteractions() {
|
||||||
|
|
Loading…
Reference in a new issue