From f1dcee2d39a6e5c9bfad32074b79d5cd08432ab6 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 9 Jul 2024 13:41:43 +0200 Subject: [PATCH] Documentation update --- src/Logic/Osm/Actions/ChangeLocationAction.ts | 2 +- src/Logic/Osm/Actions/DeleteAction.ts | 13 +++++++++++++ src/Logic/Osm/Changes.ts | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Logic/Osm/Actions/ChangeLocationAction.ts b/src/Logic/Osm/Actions/ChangeLocationAction.ts index be84fed48..9c774b839 100644 --- a/src/Logic/Osm/Actions/ChangeLocationAction.ts +++ b/src/Logic/Osm/Actions/ChangeLocationAction.ts @@ -14,7 +14,7 @@ export default class ChangeLocationAction extends OsmChangeAction { }[] = [ { value: "relocated|improve_accuraccy|...", - docs: "Will appear if the ", + docs: "Will appear if the point has been moved", changeType: ["move"], specialMotivation: true, }, diff --git a/src/Logic/Osm/Actions/DeleteAction.ts b/src/Logic/Osm/Actions/DeleteAction.ts index 084a66624..fde6e867d 100644 --- a/src/Logic/Osm/Actions/DeleteAction.ts +++ b/src/Logic/Osm/Actions/DeleteAction.ts @@ -20,6 +20,19 @@ export default class DeleteAction extends OsmChangeAction { private readonly _id: OsmId private readonly _hardDelete: boolean + static metatags: { + readonly key?: string + readonly value?: string + readonly docs: string + readonly changeType: string[] + readonly specialMotivation?: boolean + }[] = [ + { + docs: "Will appear if the object was deleted", + changeType: ["deletion"], + specialMotivation: true, + }, + ] constructor( id: OsmId, softDeletionTags: TagsFilter | undefined, diff --git a/src/Logic/Osm/Changes.ts b/src/Logic/Osm/Changes.ts index b703cde2b..69b818a03 100644 --- a/src/Logic/Osm/Changes.ts +++ b/src/Logic/Osm/Changes.ts @@ -20,6 +20,7 @@ import Table from "../../UI/Base/Table" import ChangeLocationAction from "./Actions/ChangeLocationAction" import ChangeTagAction from "./Actions/ChangeTagAction" import FeatureSwitchState from "../State/FeatureSwitchState" +import DeleteAction from "./Actions/DeleteAction" /** * Handles all changes made to OSM. @@ -177,6 +178,7 @@ export class Changes { ), ...addSource(ChangeTagAction.metatags, "ChangeTag"), ...addSource(ChangeLocationAction.metatags, "ChangeLocation"), + ...addSource(DeleteAction.metatags, "DeleteAction") // TODO /* ...DeleteAction.metatags,