From a143ecfb2a90885e8ed69c976ed6cf6b267db657 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 5 Mar 2024 17:14:41 +0100 Subject: [PATCH 1/2] Cleanup: remove unneeded imports --- src/UI/BigComponents/NewPointLocationInput.svelte | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/UI/BigComponents/NewPointLocationInput.svelte b/src/UI/BigComponents/NewPointLocationInput.svelte index 0996f095e4..bf77c4adca 100644 --- a/src/UI/BigComponents/NewPointLocationInput.svelte +++ b/src/UI/BigComponents/NewPointLocationInput.svelte @@ -2,7 +2,6 @@ import type { SpecialVisualizationState } from "../SpecialVisualization" import LocationInput from "../InputElement/Helpers/LocationInput.svelte" import { UIEventSource } from "../../Logic/UIEventSource" - import { Tiles } from "../../Models/TileRange" import { Map as MlMap } from "maplibre-gl" import { BBox } from "../../Logic/BBox" import type { MapProperties } from "../../Models/MapProperties" @@ -15,7 +14,6 @@ import FeatureSourceMerger from "../../Logic/FeatureSource/Sources/FeatureSourceMerger" import LayerConfig from "../../Models/ThemeConfig/LayerConfig" import { Utils } from "../../Utils" - import { createEventDispatcher } from "svelte" import Move_arrows from "../../assets/svg/Move_arrows.svelte" /** From c70ab964279ab115b0226ff14a960fdfe4db3eb6 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 5 Mar 2024 17:15:11 +0100 Subject: [PATCH 2/2] Fix #1809 --- src/UI/Popup/MoveWizardState.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/UI/Popup/MoveWizardState.ts b/src/UI/Popup/MoveWizardState.ts index e4ff3d7d28..bad0dd8a6e 100644 --- a/src/UI/Popup/MoveWizardState.ts +++ b/src/UI/Popup/MoveWizardState.ts @@ -130,6 +130,15 @@ export class MoveWizardState { this.moveDisallowedReason.setData(t.partOfRelation) } }) + } else { + // This is a new point. Check if it was snapped to an existing way due to the '_referencing_ways'-tag + const store = this._state.featureProperties.getStore(id) + store?.addCallbackAndRunD((tags) => { + if (tags._referencing_ways !== "[]") { + console.log("Got referencing ways according to the tags") + this.moveDisallowedReason.setData(t.partOfAWay) + } + }) } } }