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),
{

View file

@ -34,7 +34,7 @@
specs = SpecialVisualizations.constructSpecification(txt);
}
} catch (e) {
console.error("Could not construct a specification and with arguments", txt);
console.error("Could not construct a specification and with arguments", txt,"due to",e);
}
}
@ -43,7 +43,7 @@
try {
return specpart.func.constr(state, tags, specpart.args, feature, layer);
} catch (e) {
console.error("Could not construct a special visualisation with specification", specpart, "and tags", tags);
console.error("Could not construct a special visualisation with specification", specpart, "and tags", tags,"due to", e);
}
}
}