forked from MapComplete/MapComplete
Fix custom layouts
This commit is contained in:
parent
8e2e367a0c
commit
4b6769d601
5 changed files with 76 additions and 23 deletions
|
@ -406,7 +406,12 @@ export class UpdateLegacyLayer extends DesugaringStep<LayerConfigJson | string |
|
|||
}
|
||||
|
||||
if (config.tagRenderings !== undefined) {
|
||||
let i =0;
|
||||
for (const tagRendering of config.tagRenderings) {
|
||||
i++;
|
||||
if(typeof tagRendering === "string" || tagRendering["builtin"] !== undefined){
|
||||
continue
|
||||
}
|
||||
if (tagRendering["id"] === undefined) {
|
||||
|
||||
if (tagRendering["#"] !== undefined) {
|
||||
|
@ -414,6 +419,8 @@ export class UpdateLegacyLayer extends DesugaringStep<LayerConfigJson | string |
|
|||
delete tagRendering["#"]
|
||||
} else if (tagRendering["freeform"]?.key !== undefined) {
|
||||
tagRendering["id"] = config.id + "-" + tagRendering["freeform"]["key"]
|
||||
}else{
|
||||
tagRendering["id"] = "tr-"+i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue