Disable editing when userbadge is disabled

This commit is contained in:
Pieter Vander Vennet 2020-11-12 12:21:34 +01:00
parent 97c3b52236
commit 52f53eb6b6
3 changed files with 8 additions and 2 deletions

View file

@ -5,6 +5,7 @@ import EditableTagRendering from "./EditableTagRendering";
import QuestionBox from "./QuestionBox";
import Combine from "../Base/Combine";
import TagRenderingAnswer from "./TagRenderingAnswer";
import State from "../../State";
export class FeatureInfoBox extends UIElement {
private _tags: UIEventSource<any>;
@ -33,7 +34,9 @@ export class FeatureInfoBox extends UIElement {
layerConfig.titleIcons.map(icon => new TagRenderingAnswer(tags, icon)))
.SetClass("featureinfobox-icons");
this._renderings = layerConfig.tagRenderings.map(tr => new EditableTagRendering(tags, tr));
this._questionBox = new QuestionBox(tags, layerConfig.tagRenderings);
if (State.state.featureSwitchUserbadge.data) {
this._questionBox = new QuestionBox(tags, layerConfig.tagRenderings);
}
}