Correctly add elements to featureInfoBox
This commit is contained in:
parent
6af3d41886
commit
09ba1b37c6
1 changed files with 31 additions and 16 deletions
|
@ -12,7 +12,7 @@ import {Tag} from "../../Logic/Tags/Tag";
|
|||
import Constants from "../../Models/Constants";
|
||||
import SharedTagRenderings from "../../Customizations/SharedTagRenderings";
|
||||
import BaseUIElement from "../BaseUIElement";
|
||||
import AllKnownLayers from "../../Customizations/AllKnownLayers";
|
||||
import {VariableUiElement} from "../Base/VariableUIElement";
|
||||
|
||||
export default class FeatureInfoBox extends ScrollableFullScreen {
|
||||
|
||||
|
@ -71,17 +71,32 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
|
|||
renderings.push(new TagRenderingAnswer(tags, SharedTagRenderings.SharedTagRendering.get("minimap")))
|
||||
}
|
||||
|
||||
if (State.state.osmConnection.userDetails.data.csCount >= Constants.userJourney.historyLinkVisible ||
|
||||
State.state.featureSwitchIsDebugging.data == true ||
|
||||
State.state.featureSwitchIsTesting.data == true) {
|
||||
renderings.push(new TagRenderingAnswer( tags, SharedTagRenderings.SharedTagRendering.get("last_edit")))
|
||||
renderings.push(
|
||||
new VariableUiElement(
|
||||
State.state.osmConnection.userDetails.map(userdetails => {
|
||||
if (userdetails.csCount <= Constants.userJourney.historyLinkVisible
|
||||
&& State.state.featureSwitchIsDebugging.data == false
|
||||
&& State.state.featureSwitchIsTesting.data === false) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
return new TagRenderingAnswer(tags, SharedTagRenderings.SharedTagRendering.get("last_edit"));
|
||||
|
||||
if (State.state.featureSwitchIsDebugging.data) {
|
||||
}, [State.state.featureSwitchIsDebugging])
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
renderings.push(
|
||||
new VariableUiElement(
|
||||
State.state.featureSwitchIsDebugging.map(isDebugging => {
|
||||
if (isDebugging) {
|
||||
const config: TagRenderingConfig = new TagRenderingConfig({render: "{all_tags()}"}, new Tag("id", ""), "");
|
||||
renderings.push(new TagRenderingAnswer(tags, config))
|
||||
return new TagRenderingAnswer(tags, config)
|
||||
}
|
||||
})
|
||||
)
|
||||
)
|
||||
|
||||
return new Combine(renderings).SetClass("block")
|
||||
|
||||
|
|
Loading…
Reference in a new issue