forked from MapComplete/MapComplete
		
	Add labels and groups to layer documentation
This commit is contained in:
		
							parent
							
								
									4f6f264445
								
							
						
					
					
						commit
						f5de77c55e
					
				
					 1 changed files with 17 additions and 2 deletions
				
			
		|  | @ -542,13 +542,28 @@ export default class TagRenderingConfig { | ||||||
|                 ).SetClass("code") |                 ).SetClass("code") | ||||||
|                  , "is shown"]) |                  , "is shown"]) | ||||||
|         } |         } | ||||||
| 
 |          | ||||||
|  |         let group : BaseUIElement = undefined | ||||||
|  |         if(this.group !== undefined && this.group !== ""){ | ||||||
|  |             group = new Combine([ | ||||||
|  |                 "This tagrendering is part of group ", new FixedUiElement(this.group).SetClass("code") | ||||||
|  |             ]) | ||||||
|  |         } | ||||||
|  |         let labels : BaseUIElement = undefined | ||||||
|  |         if(this.labels?.length > 0){ | ||||||
|  |             labels = new Combine([ | ||||||
|  |                 "This tagrendering has labels ", | ||||||
|  |                 ...this.labels.map(label => new FixedUiElement(label).SetClass("code")) | ||||||
|  |             ]) | ||||||
|  |         } | ||||||
|         return new Combine([ |         return new Combine([ | ||||||
|             new Title(this.id, 3), |             new Title(this.id, 3), | ||||||
|             this.question !== undefined ? "The question is **" + this.question.txt + "**" : "_This tagrendering has no question and is thus read-only_", |             this.question !== undefined ? "The question is **" + this.question.txt + "**" : "_This tagrendering has no question and is thus read-only_", | ||||||
|             new Combine(withRender), |             new Combine(withRender), | ||||||
|             mappings, |             mappings, | ||||||
|             condition |             condition, | ||||||
|  |             group, | ||||||
|  |             labels | ||||||
|         ]).SetClass("flex-col"); |         ]).SetClass("flex-col"); | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue