More work on import flow

This commit is contained in:
Pieter Vander Vennet 2022-01-25 00:48:05 +01:00
parent 33ef83c4a9
commit fa179af601
8 changed files with 54 additions and 12 deletions

View file

@ -538,10 +538,15 @@ export class ImportPointButton extends AbstractImportButton {
if (snapOntoWayId !== undefined) {
snapOnto = await OsmObject.DownloadObjectAsync(snapOntoWayId)
}
let specialMotivation = undefined
if(args.note_id !== undefined){
specialMotivation = "source: https://osm.org/note/"+args.note_id
}
const newElementAction = new CreateNewNodeAction(tags, location.lat, location.lon, {
theme: state.layoutToUse.id,
changeType: "import",
snapOnto: <OsmWay>snapOnto
snapOnto: <OsmWay>snapOnto,
specialMotivation
})
await state.changes.applyAction(newElementAction)