forked from MapComplete/MapComplete
		
	Merge branches
This commit is contained in:
		
						commit
						e58b93e562
					
				
					 4 changed files with 66 additions and 13 deletions
				
			
		|  | @ -11,6 +11,7 @@ import {TagRenderingConfigJson} from "../Json/TagRenderingConfigJson"; | |||
| import {Translation} from "../../../UI/i18n/Translation"; | ||||
| import {SubstitutedTranslation} from "../../../UI/SubstitutedTranslation"; | ||||
| import DependencyCalculator from "../DependencyCalculator"; | ||||
| import Translations from "../../../UI/i18n/Translations"; | ||||
| 
 | ||||
| class SubstituteLayer extends Conversion<(string | LayerConfigJson), LayerConfigJson[]> { | ||||
|     constructor() { | ||||
|  | @ -178,7 +179,7 @@ class AddImportLayers extends DesugaringStep<LayoutConfigJson> { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| class AddMiniMap extends DesugaringStep<LayerConfigJson> { | ||||
| export class AddMiniMap extends DesugaringStep<LayerConfigJson> { | ||||
|     constructor() { | ||||
|         super("Adds a default 'minimap'-element to the tagrenderings if none of the elements define such a minimap", ["tagRenderings"]); | ||||
|     } | ||||
|  | @ -187,8 +188,9 @@ class AddMiniMap extends DesugaringStep<LayerConfigJson> { | |||
|      * Returns true if this tag rendering has a minimap in some language. | ||||
|      * Note: this minimap can be hidden by conditions | ||||
|      */ | ||||
|     private static hasMinimap(renderingConfig: TagRenderingConfigJson): boolean { | ||||
|         const translations: Translation[] = Utils.NoNull([renderingConfig.render, ...(renderingConfig.mappings ?? []).map(m => m.then)]); | ||||
|     public static hasMinimap(renderingConfig: TagRenderingConfigJson): boolean { | ||||
|         const translations: Translation[] = Utils.NoNull([renderingConfig.render, ...(renderingConfig.mappings ?? []).map(m => m.then)]) | ||||
|             .map(Translations.T); | ||||
|         for (const translation of translations) { | ||||
|             for (const key in translation.translations) { | ||||
|                 if (!translation.translations.hasOwnProperty(key)) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue