forked from MapComplete/MapComplete
Add various bug fixes and improvements
This commit is contained in:
parent
15a9441b1d
commit
6c4b15e33d
18 changed files with 99 additions and 123 deletions
|
@ -25,11 +25,12 @@ export default class FeatureInfoBox extends UIElement {
|
|||
|
||||
|
||||
const title = new TagRenderingAnswer(tags, layerConfig.title ?? new TagRenderingConfig("POI", undefined))
|
||||
.SetClass("text-2xl break-words font-bold p-2");
|
||||
.AddClass("text-2xl break-words font-bold p-2");
|
||||
this.title = title;
|
||||
const titleIcons = new Combine(
|
||||
layerConfig.titleIcons.map(icon => new TagRenderingAnswer(tags, icon)))
|
||||
.SetClass("h-8 w-8 pt-2 box-content");
|
||||
layerConfig.titleIcons.map(icon => new TagRenderingAnswer(tags, icon)
|
||||
.AddClass("block w-8 h-8 align-baseline box-content p-0.5")))
|
||||
.AddClass("flex flex-row flex-wrap pt-1 items-center mr-2");
|
||||
|
||||
let questionBox: UIElement = undefined;
|
||||
if (State.state.featureSwitchUserbadge.data) {
|
||||
|
|
|
@ -21,6 +21,7 @@ export default class TagRenderingAnswer extends UIElement {
|
|||
if (configuration === undefined) {
|
||||
throw "Trying to generate a tagRenderingAnswer without configuration..."
|
||||
}
|
||||
this.AddClass("flex items-center flex-row text-lg")
|
||||
}
|
||||
|
||||
InnerRender(): string {
|
||||
|
@ -34,11 +35,6 @@ export default class TagRenderingAnswer extends UIElement {
|
|||
if (tags === undefined) {
|
||||
return "";
|
||||
}
|
||||
const tr = this._configuration.GetRenderValue(tags);
|
||||
if (tr !== undefined) {
|
||||
this._content = new SubstitutedTranslation(tr, this._tags);
|
||||
return this._content.Render();
|
||||
}
|
||||
|
||||
// The render value doesn't work well with multi-answers (checkboxes), so we have to check for them manually
|
||||
if (this._configuration.multiAnswer) {
|
||||
|
@ -65,6 +61,14 @@ export default class TagRenderingAnswer extends UIElement {
|
|||
return this._content.Render();
|
||||
}
|
||||
}
|
||||
|
||||
const tr = this._configuration.GetRenderValue(tags);
|
||||
if (tr !== undefined) {
|
||||
this._content = new SubstitutedTranslation(tr, this._tags);
|
||||
return this._content.Render();
|
||||
}
|
||||
|
||||
|
||||
return "";
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue