Merge master

This commit is contained in:
Pieter Vander Vennet 2022-09-14 14:45:09 +02:00
commit a1a12e6f38
72 changed files with 1612 additions and 1282 deletions

View file

@ -1,13 +1,13 @@
import {OsmObject} from "../OsmObject"
import { OsmObject } from "../OsmObject"
import OsmChangeAction from "./OsmChangeAction"
import {Changes} from "../Changes"
import {ChangeDescription} from "./ChangeDescription"
import { Changes } from "../Changes"
import { ChangeDescription } from "./ChangeDescription"
import ChangeTagAction from "./ChangeTagAction"
import {TagsFilter} from "../../Tags/TagsFilter"
import {And} from "../../Tags/And"
import {Tag} from "../../Tags/Tag"
import {Utils} from "../../../Utils";
import {OsmId} from "../../../Models/OsmFeature";
import { Utils } from "../../../Utils"
export default class DeleteAction extends OsmChangeAction {
private readonly _softDeletionTags: TagsFilter
@ -32,16 +32,17 @@ export default class DeleteAction extends OsmChangeAction {
super(id, true)
this._id = id
this._hardDelete = hardDelete
this.meta = {...meta, changeType: "deletion"}
this.meta = { ...meta, changeType: "deletion" }
if (softDeletionTags?.usedKeys()?.indexOf("fixme") >= 0) {
this._softDeletionTags = softDeletionTags
} else {
this._softDeletionTags = new And(Utils.NoNull([
softDeletionTags,
this._softDeletionTags = new And(
Utils.NoNull([
softDeletionTags,
new Tag(
"fixme",
`A mapcomplete user marked this feature to be deleted (${meta.specialMotivation})`
),
)
]))
}
}