forked from MapComplete/MapComplete
Merge develop
This commit is contained in:
commit
08ffe4b7c0
146 changed files with 4380 additions and 1435 deletions
|
@ -55,8 +55,13 @@ export class NewGeometryFromChangesFeatureSource implements WritableFeatureSourc
|
|||
* @private
|
||||
*/
|
||||
private handleChange(change: ChangeDescription): boolean {
|
||||
const allElementStorage = this._allElementStorage
|
||||
if (change.changes === undefined) {
|
||||
// The geometry is not described - not a new point or geometry change, but probably a tagchange to a newly created point
|
||||
// Not something that should be handled here
|
||||
return false
|
||||
}
|
||||
|
||||
const allElementStorage = this._allElementStorage
|
||||
console.log("Handling pending change", change)
|
||||
if (change.id > 0) {
|
||||
// This is an already existing object
|
||||
|
@ -85,10 +90,6 @@ export class NewGeometryFromChangesFeatureSource implements WritableFeatureSourc
|
|||
this._featureProperties.trackFeature(feature)
|
||||
this.addNewFeature(feature)
|
||||
return true
|
||||
} else if (change.changes === undefined) {
|
||||
// The geometry is not described - not a new point or geometry change, but probably a tagchange to a newly created point
|
||||
// Not something that should be handled here
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -150,7 +151,7 @@ export class NewGeometryFromChangesFeatureSource implements WritableFeatureSourc
|
|||
continue
|
||||
}
|
||||
|
||||
somethingChanged ||= this.handleChange(change)
|
||||
somethingChanged = this.handleChange(change) || somethingChanged // important: _first_ evaluate the method, to avoid shortcutting
|
||||
}
|
||||
if (somethingChanged) {
|
||||
this.features.ping()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue