forked from MapComplete/MapComplete
		
	Mapillary bugfix
This commit is contained in:
		
							parent
							
								
									895aa132ec
								
							
						
					
					
						commit
						ab2e9425c2
					
				
					 5 changed files with 114 additions and 111 deletions
				
			
		
							
								
								
									
										29
									
								
								test.ts
									
										
									
									
									
								
							
							
						
						
									
										29
									
								
								test.ts
									
										
									
									
									
								
							|  | @ -6,29 +6,42 @@ import {TagRenderingConfigJson} from "./Customizations/JSON/TagRenderingConfigJs | |||
| import TagRenderingConfig from "./Customizations/JSON/TagRenderingConfig"; | ||||
| import Locale from "./UI/i18n/Locale"; | ||||
| import EditableTagRendering from "./UI/Popup/EditableTagRendering"; | ||||
| import TagRenderingQuestion from "./UI/Popup/TagRenderingQuestion"; | ||||
| 
 | ||||
| const tagRendering: TagRenderingConfigJson = { | ||||
|     question: {"en": "What is the name of?", nl: "Wat is de naam van?", fr: "C'est quoi le nom"}, | ||||
|     mappings: [ | ||||
|         { | ||||
|             if: "noname=yes", | ||||
|             then: "Has no name" | ||||
|             if: "valves=A", | ||||
|             then: "A" | ||||
|         }, | ||||
|         { | ||||
|             if: "valves=B", | ||||
|             then: "B" | ||||
|         }, | ||||
|         { | ||||
|             if: "valves=C", | ||||
|             then: "C" | ||||
|         }, { | ||||
|             if: "valves:special=A", | ||||
|             then: "SPecial" | ||||
|         } | ||||
|     ], | ||||
|     render: "The name is {name}", | ||||
|     render: "Valves: {valves}", | ||||
|     multiAnswer: true, | ||||
|     freeform: { | ||||
|         key: "name", | ||||
|         key: "valves", | ||||
|         type: "string", | ||||
|         addExtraTags: ["noname="] | ||||
|     }//*/
 | ||||
|         addExtraTags: ["fixme=valves"] | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| const config = new TagRenderingConfig(tagRendering) | ||||
| 
 | ||||
| const tags = new UIEventSource({id: "node/-1", "amenity": "bench", name: "pietervdvn"}) | ||||
| 
 | ||||
| // new TagRenderingQuestion(tags, config).AttachTo("maindiv")
 | ||||
| new EditableTagRendering(tags, config).AttachTo('maindiv') | ||||
|  new TagRenderingQuestion(tags, config).AttachTo("maindiv") | ||||
| // new EditableTagRendering(tags, config).AttachTo('maindiv')
 | ||||
| Locale.CreateLanguagePicker(["nl", "en", "fr"]).AttachTo("extradiv") | ||||
| /*/ | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue