forked from MapComplete/MapComplete
		
	Fix generateLayerOverview, drop priviliged 'icons.json' from code
This commit is contained in:
		
							parent
							
								
									df3ca4cce3
								
							
						
					
					
						commit
						36aed99843
					
				
					 10 changed files with 267 additions and 167 deletions
				
			
		|  | @ -1,7 +1,6 @@ | |||
| import PointRenderingConfigJson from "./Json/PointRenderingConfigJson" | ||||
| import TagRenderingConfig from "./TagRenderingConfig" | ||||
| import { TagsFilter } from "../../Logic/Tags/TagsFilter" | ||||
| import SharedTagRenderings from "../../Customizations/SharedTagRenderings" | ||||
| import { TagUtils } from "../../Logic/Tags/TagUtils" | ||||
| import { Utils } from "../../Utils" | ||||
| import Svg from "../../Svg" | ||||
|  | @ -72,18 +71,9 @@ export default class PointRenderingConfig extends WithContextLoader { | |||
|         } | ||||
|         this.cssClasses = this.tr("cssClasses", undefined) | ||||
|         this.iconBadges = (json.iconBadges ?? []).map((overlay, i) => { | ||||
|             let tr: TagRenderingConfig | ||||
|             if ( | ||||
|                 typeof overlay.then === "string" && | ||||
|                 SharedTagRenderings.SharedIcons.get(overlay.then) !== undefined | ||||
|             ) { | ||||
|                 tr = SharedTagRenderings.SharedIcons.get(overlay.then) | ||||
|             } else { | ||||
|                 tr = new TagRenderingConfig(overlay.then, `iconBadges.${i}`) | ||||
|             } | ||||
|             return { | ||||
|                 if: TagUtils.Tag(overlay.if), | ||||
|                 then: tr, | ||||
|                 then: new TagRenderingConfig(overlay.then, `iconBadges.${i}`), | ||||
|             } | ||||
|         }) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue