Detect an element that is deleted upstream; show 'this element is deleted in infopanel'

This commit is contained in:
Pieter Vander Vennet 2022-12-16 01:09:18 +01:00
parent c9f6b93add
commit 5e1b4d95ab
3 changed files with 41 additions and 11 deletions

View file

@ -77,10 +77,21 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
}
public static GenerateContent(
tags: UIEventSource<any>,
layerConfig: LayerConfig,
state: FeaturePipelineState): BaseUIElement{
return new Toggle(
"This object is deleted",
FeatureInfoBox.GenerateMainContent(tags, layerConfig, state),
tags.map(t => t["_deleted"] == "yes")
)
}
private static GenerateMainContent(
tags: UIEventSource<any>,
layerConfig: LayerConfig,
state: FeaturePipelineState
): BaseUIElement {
let questionBoxes: Map<string, QuestionBox> = new Map<string, QuestionBox>()
const t = Translations.t.general
const allGroupNames = Utils.Dedup(layerConfig.tagRenderings.map((tr) => tr.group))