Merge branch 'master' into feature/schools

This commit is contained in:
Pieter Vander Vennet 2022-06-21 16:48:19 +02:00
commit cbf2036f44
5 changed files with 41 additions and 14 deletions

View file

@ -205,6 +205,11 @@ export class FixImages extends DesugaringStep<LayoutConfigJson> {
let relative = url.protocol + "//" + url.host + url.pathname
relative = relative.substring(0, relative.lastIndexOf("/"))
const self = this;
if(relative.endsWith("assets/generated/themes")){
warnings.push("Detected 'assets/generated/themes' as relative URL. I'm assuming that you are loading your file for the MC-repository, so I'm rewriting all image links as if they were absolute instead of relative")
relative = absolute
}
function replaceString(leaf: string) {
if (self._knownImages.has(leaf)) {

View file

@ -100,7 +100,7 @@ export class UpdateLegacyLayer extends DesugaringStep<LayerConfigJson | string |
delete config["wayHandling"]
delete config["hideUnderlayingFeaturesMinPercentage"]
for (const mapRenderingElement of config.mapRendering) {
for (const mapRenderingElement of (config.mapRendering ?? [])) {
if (mapRenderingElement["iconOverlays"] !== undefined) {
mapRenderingElement["iconBadges"] = mapRenderingElement["iconOverlays"]
}