forked from MapComplete/MapComplete
Formatting
This commit is contained in:
parent
f6fa8c9f9f
commit
306a67fca1
1 changed files with 17 additions and 15 deletions
|
@ -1,12 +1,12 @@
|
||||||
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"
|
||||||
import {Utils} from "../../../Utils";
|
import { Utils } from "../../../Utils"
|
||||||
|
|
||||||
export default class DeleteAction extends OsmChangeAction {
|
export default class DeleteAction extends OsmChangeAction {
|
||||||
private readonly _softDeletionTags: TagsFilter
|
private readonly _softDeletionTags: TagsFilter
|
||||||
|
@ -30,17 +30,19 @@ 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" }
|
||||||
if (softDeletionTags?.usedKeys()?.indexOf("fixme") >= 0) {
|
if (softDeletionTags?.usedKeys()?.indexOf("fixme") >= 0) {
|
||||||
this._softDeletionTags = softDeletionTags
|
this._softDeletionTags = softDeletionTags
|
||||||
} else {
|
} else {
|
||||||
this._softDeletionTags = new And(Utils.NoNull([
|
this._softDeletionTags = new And(
|
||||||
softDeletionTags,
|
Utils.NoNull([
|
||||||
new Tag(
|
softDeletionTags,
|
||||||
"fixme",
|
new Tag(
|
||||||
`A mapcomplete user marked this feature to be deleted (${meta.specialMotivation})`
|
"fixme",
|
||||||
),
|
`A mapcomplete user marked this feature to be deleted (${meta.specialMotivation})`
|
||||||
]))
|
),
|
||||||
|
])
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue