forked from MapComplete/MapComplete
Add explicit api_url to config and testserver-mode indication, add id rewrite when changes are applied to fix image upload on a new object, various formatting fixes; version bump
This commit is contained in:
parent
39376c0012
commit
a4db7178f4
16 changed files with 277 additions and 192 deletions
|
|
@ -136,7 +136,7 @@ export class ChangeDescriptionTools {
|
|||
mappings: Map<string, string>
|
||||
): ChangeDescription {
|
||||
const key = change.type + "/" + change.id
|
||||
|
||||
console.log("Checking remapping ", change.id, mappings, change)
|
||||
const wayHasChangedNode = ((change.changes ?? {})["nodes"] ?? []).some((id) =>
|
||||
mappings.has("node/" + id)
|
||||
)
|
||||
|
|
@ -199,4 +199,11 @@ export class ChangeDescriptionTools {
|
|||
return r.asGeoJson().geometry
|
||||
}
|
||||
}
|
||||
|
||||
public static rewriteAllIds(
|
||||
changes: ChangeDescription[],
|
||||
mappings: Map<string, string>
|
||||
): ChangeDescription[] {
|
||||
return changes.map(c =>ChangeDescriptionTools.rewriteIds(c, mappings))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue