forked from MapComplete/MapComplete
		
	More refactoring
This commit is contained in:
		
							parent
							
								
									231f4f2c97
								
							
						
					
					
						commit
						6890c5189e
					
				
					 12 changed files with 52 additions and 59 deletions
				
			
		|  | @ -31,14 +31,14 @@ export default class ImportButton extends Toggle { | |||
|         const button = new SubtleButton(imageUrl, message) | ||||
| 
 | ||||
| 
 | ||||
|         button.onClick(() => { | ||||
|         button.onClick(async () => { | ||||
|             if (isImported.data) { | ||||
|                 return | ||||
|             } | ||||
|             originalTags.data["_imported"] = "yes" | ||||
|             originalTags.ping() // will set isImported as per its definition
 | ||||
|             const newElementAction = new CreateNewNodeAction(newTags.data, lat, lon) | ||||
|             State.state.changes.applyAction(newElementAction) | ||||
|             await State.state.changes.applyAction(newElementAction) | ||||
|             State.state.selectedElement.setData(State.state.allElements.ContainingFeatures.get( | ||||
|                 newElementAction.newElementId | ||||
|             )) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue