From 09507b353775bb500231bc3b0cec5992deb2a17d Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 3 Jan 2023 23:45:04 +0100 Subject: [PATCH] Fix typo which prevented updating the selected element, improve comments and typings --- Logic/Actors/StrayClickHandler.ts | 4 +++- Logic/BBox.ts | 2 +- Logic/Osm/OsmObject.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Logic/Actors/StrayClickHandler.ts b/Logic/Actors/StrayClickHandler.ts index 003917f027..c4fac415b7 100644 --- a/Logic/Actors/StrayClickHandler.ts +++ b/Logic/Actors/StrayClickHandler.ts @@ -4,8 +4,10 @@ import ScrollableFullScreen from "../../UI/Base/ScrollableFullScreen" import BaseUIElement from "../../UI/BaseUIElement" /** - * The stray-click-hanlders adds a marker to the map if no feature was clicked. + * The stray-click-handler adds a marker to the map if no feature was clicked. * Shows the given uiToShow-element in the messagebox + * + * Note: the actual implementation is in StrayClickHandlerImplementation */ export default class StrayClickHandler { public static construct = ( diff --git a/Logic/BBox.ts b/Logic/BBox.ts index a48497adc9..abb0e3711f 100644 --- a/Logic/BBox.ts +++ b/Logic/BBox.ts @@ -178,7 +178,7 @@ export class BBox { ]) } - toLeaflet() { + toLeaflet(): [[number, number], [number, number]] { return [ [this.minLat, this.minLon], [this.maxLat, this.maxLon], diff --git a/Logic/Osm/OsmObject.ts b/Logic/Osm/OsmObject.ts index 20c76f0abd..37ec0c41c4 100644 --- a/Logic/Osm/OsmObject.ts +++ b/Logic/Osm/OsmObject.ts @@ -73,7 +73,7 @@ export abstract class OsmObject { if (rawData["error"] !== undefined && rawData["statuscode"] === 410) { return "deleted" } - return rawData["contents"].elements[0].tags + return rawData["content"].elements[0].tags } static async DownloadObjectAsync(