forked from MapComplete/MapComplete
Fix: improve functionality of GRB-theme (WIP)
This commit is contained in:
parent
66f2999422
commit
b86e2910ba
10 changed files with 270 additions and 241 deletions
|
@ -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),
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue