Make fixme optional if stated in the softDeletionTags
This commit is contained in:
parent
4e346c2820
commit
6c3f9bae25
2 changed files with 22 additions and 16 deletions
|
@ -1,11 +1,11 @@
|
||||||
import { OsmObject } from "../OsmObject"
|
import {OsmObject} from "../OsmObject"
|
||||||
import OsmChangeAction from "./OsmChangeAction"
|
import OsmChangeAction from "./OsmChangeAction"
|
||||||
import { Changes } from "../Changes"
|
import {Changes} from "../Changes"
|
||||||
import { ChangeDescription } from "./ChangeDescription"
|
import {ChangeDescription} from "./ChangeDescription"
|
||||||
import ChangeTagAction from "./ChangeTagAction"
|
import ChangeTagAction from "./ChangeTagAction"
|
||||||
import { TagsFilter } from "../../Tags/TagsFilter"
|
import {TagsFilter} from "../../Tags/TagsFilter"
|
||||||
import { And } from "../../Tags/And"
|
import {And} from "../../Tags/And"
|
||||||
import { Tag } from "../../Tags/Tag"
|
import {Tag} from "../../Tags/Tag"
|
||||||
|
|
||||||
export default class DeleteAction extends OsmChangeAction {
|
export default class DeleteAction extends OsmChangeAction {
|
||||||
private readonly _softDeletionTags: TagsFilter
|
private readonly _softDeletionTags: TagsFilter
|
||||||
|
@ -29,14 +29,18 @@ export default class DeleteAction extends OsmChangeAction {
|
||||||
super(id, true)
|
super(id, true)
|
||||||
this._id = id
|
this._id = id
|
||||||
this._hardDelete = hardDelete
|
this._hardDelete = hardDelete
|
||||||
this.meta = { ...meta, changeType: "deletion" }
|
this.meta = {...meta, changeType: "deletion"}
|
||||||
this._softDeletionTags = new And([
|
if (softDeletionTags.usedKeys().indexOf("fixme") >= 0) {
|
||||||
softDeletionTags,
|
this._softDeletionTags = softDeletionTags
|
||||||
new Tag(
|
} else {
|
||||||
"fixme",
|
this._softDeletionTags = new And([
|
||||||
`A mapcomplete user marked this feature to be deleted (${meta.specialMotivation})`
|
softDeletionTags,
|
||||||
),
|
new Tag(
|
||||||
])
|
"fixme",
|
||||||
|
`A mapcomplete user marked this feature to be deleted (${meta.specialMotivation})`
|
||||||
|
),
|
||||||
|
])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async CreateChangeDescriptions(changes: Changes): Promise<ChangeDescription[]> {
|
public async CreateChangeDescriptions(changes: Changes): Promise<ChangeDescription[]> {
|
||||||
|
|
|
@ -518,6 +518,8 @@
|
||||||
"motor_vehicle=",
|
"motor_vehicle=",
|
||||||
"vehicle=",
|
"vehicle=",
|
||||||
"inline_skate=",
|
"inline_skate=",
|
||||||
|
"inline_skates=",
|
||||||
|
"mofa=",
|
||||||
"moped=",
|
"moped=",
|
||||||
"moped_a=",
|
"moped_a=",
|
||||||
"moped_b=",
|
"moped_b=",
|
||||||
|
@ -526,8 +528,8 @@
|
||||||
"maxwidth:physical=",
|
"maxwidth:physical=",
|
||||||
"width:separation=",
|
"width:separation=",
|
||||||
"width:opening=",
|
"width:opening=",
|
||||||
"overlap="
|
"overlap=",
|
||||||
|
"fixme="
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue