Fix: improve functionality of GRB-theme (WIP)

This commit is contained in:
Pieter Vander Vennet 2023-05-24 03:26:33 +02:00
parent 66f2999422
commit b86e2910ba
10 changed files with 270 additions and 241 deletions

View file

@ -671,9 +671,12 @@ export class ImportPointButton extends AbstractImportButton {
) {
originalFeatureTags.data["_imported"] = "yes"
originalFeatureTags.ping() // will set isImported as per its definition
let snapOnto: OsmObject = undefined
let snapOnto: OsmObject | "deleted" = undefined
if (snapOntoWayId !== undefined) {
snapOnto = await OsmObject.DownloadObjectAsync(snapOntoWayId)
snapOnto = await state.osmObjectDownloader.DownloadObjectAsync(snapOntoWayId)
}
if(snapOnto === "deleted"){
return new FixedUiElement("Error - way is deleted. Refresh the page").SetClass("alert")
}
let specialMotivation = undefined
@ -746,7 +749,7 @@ export class ImportPointButton extends AbstractImportButton {
const [lon, lat] = <[number, number]>feature.geometry.coordinates
return new ConfirmLocationOfPoint(
state,
state.guistate.filterViewIsOpened,
state.guistate.themeIsOpened ,
presetInfo,
Translations.W(args.text),
{