forked from MapComplete/MapComplete
		
	Refactoring: further cleanup of the themes
This commit is contained in:
		
							parent
							
								
									2f5091a8cb
								
							
						
					
					
						commit
						e86f7d863e
					
				
					 86 changed files with 230 additions and 579 deletions
				
			
		|  | @ -147,13 +147,25 @@ export class UpdateLegacyLayer extends DesugaringStep< | |||
|             const pr = <PointRenderingConfigJson>rendering | ||||
|             const iconSize = pr.iconSize | ||||
|             if (typeof iconSize === "string") | ||||
|                 if (["bottom", "center", "top"].some((a) => (<string>iconSize).endsWith("," + a))) { | ||||
|                 if (["bottom", "center", "top"].some((a) => (<string>iconSize).endsWith(a))) { | ||||
|                     const parts = iconSize.split(",").map((parts) => parts.toLowerCase().trim()) | ||||
|                     pr.anchor = parts.pop() | ||||
|                     pr.iconSize = parts.join(",") | ||||
|                 } | ||||
|         } | ||||
| 
 | ||||
|         for (const rendering of config.mapRendering) { | ||||
|             for (const key in rendering) { | ||||
|                 if ( | ||||
|                     typeof rendering[key]["render"] === "string" && | ||||
|                     Object.keys(rendering[key]).length === 1 | ||||
|                 ) { | ||||
|                     console.log("Rewrite: ", rendering[key]) | ||||
|                     rendering[key] = rendering[key]["render"] | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         return { | ||||
|             result: config, | ||||
|             errors: [], | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue