forked from MapComplete/MapComplete
New mapcomplete version
This commit is contained in:
parent
9e4035befc
commit
80f0dbe6e3
171 changed files with 1103 additions and 129 deletions
|
@ -264,7 +264,18 @@ export class FromJSON {
|
|||
const width = FromJSON.TagRenderingWithDefault(json.width, "layerwidth", "10");
|
||||
|
||||
let tagRenderingDefs = json.tagRenderings ?? [];
|
||||
if (tagRenderingDefs.indexOf("images") < 0) {
|
||||
let hasImageElement = false;
|
||||
for (const tagRenderingDef of tagRenderingDefs) {
|
||||
if (typeof tagRenderingDef !== "string") {
|
||||
continue;
|
||||
}
|
||||
let str = tagRenderingDef as string;
|
||||
if(tagRenderingDef.indexOf("images") >= 0 || str.indexOf("pictures") >= 0){
|
||||
hasImageElement = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasImageElement) {
|
||||
tagRenderingDefs = ["images", ...tagRenderingDefs];
|
||||
}
|
||||
let tagRenderings = tagRenderingDefs.map(FromJSON.TagRendering);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue