Let roaming tagrenderings appear together with the questions
This commit is contained in:
parent
2177f7ac3b
commit
bad2248658
3 changed files with 19 additions and 7 deletions
|
@ -176,7 +176,15 @@ export default class LayerConfig {
|
|||
iconOverlays: { "if": TagsFilter, then: TagRenderingConfig, badge: boolean }[]
|
||||
|
||||
}): LayerConfig {
|
||||
this.tagRenderings.push(...addAll.tagRenderings);
|
||||
|
||||
let insertionPoint = this.tagRenderings.map(tr => tr.IsQuestionBoxElement()).indexOf(true)
|
||||
if (insertionPoint < 0) {
|
||||
// No 'questions' defined - we just add them all to the end
|
||||
insertionPoint = this.tagRenderings.length;
|
||||
}
|
||||
this.tagRenderings.splice(insertionPoint, 0, ...addAll.tagRenderings);
|
||||
|
||||
|
||||
this.iconOverlays.push(...addAll.iconOverlays);
|
||||
for (const icon of addAll.titleIcons) {
|
||||
this.titleIcons.splice(0, 0, icon);
|
||||
|
|
|
@ -218,6 +218,10 @@ export default class TagRenderingConfig {
|
|||
return false;
|
||||
}
|
||||
|
||||
public IsQuestionBoxElement(): boolean{
|
||||
return this.question === null && this.condition === null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the correct rendering value (or undefined if not known)
|
||||
* @constructor
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Utils } from "../Utils";
|
|||
|
||||
export default class Constants {
|
||||
|
||||
public static vNumber = "0.5.11";
|
||||
public static vNumber = "0.5.12";
|
||||
|
||||
// The user journey states thresholds when a new feature gets unlocked
|
||||
public static userJourney = {
|
||||
|
|
Loading…
Reference in a new issue