Add labels and groups to layer documentation

This commit is contained in:
pietervdvn 2022-04-08 22:13:10 +02:00
parent 4f6f264445
commit f5de77c55e

View file

@ -542,13 +542,28 @@ export default class TagRenderingConfig {
).SetClass("code") ).SetClass("code")
, "is shown"]) , "is shown"])
} }
let group : BaseUIElement = undefined
if(this.group !== undefined && this.group !== ""){
group = new Combine([
"This tagrendering is part of group ", new FixedUiElement(this.group).SetClass("code")
])
}
let labels : BaseUIElement = undefined
if(this.labels?.length > 0){
labels = new Combine([
"This tagrendering has labels ",
...this.labels.map(label => new FixedUiElement(label).SetClass("code"))
])
}
return new Combine([ return new Combine([
new Title(this.id, 3), new Title(this.id, 3),
this.question !== undefined ? "The question is **" + this.question.txt + "**" : "_This tagrendering has no question and is thus read-only_", this.question !== undefined ? "The question is **" + this.question.txt + "**" : "_This tagrendering has no question and is thus read-only_",
new Combine(withRender), new Combine(withRender),
mappings, mappings,
condition condition,
group,
labels
]).SetClass("flex-col"); ]).SetClass("flex-col");
} }
} }