Merge master

This commit is contained in:
Pieter Vander Vennet 2022-06-22 20:06:41 +02:00
commit 98c6113cbe
87 changed files with 3860 additions and 412 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"]
}

View file

@ -60,7 +60,7 @@ export default interface PointRenderingConfigJson {
rotation?: string | TagRenderingConfigJson;
/**
* A HTML-fragment that is shown below the icon, for example:
* <div style="background: white; display: block">{name}</div>
* <div style="background: white">{name}</div>
*
* If the icon is undefined, then the label is shown in the center of the feature.
* Note that, if the wayhandling hides the icon then no label is shown as well.

View file

@ -1,3 +1,8 @@
/**
* A small interface to combine tags and tagsfilters.
*
* See https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation
*/
export interface AndOrTagConfigJson {
and?: (string | AndOrTagConfigJson)[]
or?: (string | AndOrTagConfigJson)[]