forked from MapComplete/MapComplete
Seperate logic to detect special renderings and to actually render them, add a minimap to all popups (if no minimap is defined seperately)
This commit is contained in:
parent
ab0d510cdd
commit
284102c2f1
6 changed files with 118 additions and 57 deletions
|
@ -12,6 +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";
|
||||
|
||||
export default class FeatureInfoBox extends ScrollableFullScreen {
|
||||
|
||||
|
@ -64,13 +65,19 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
|
|||
if (!questionBoxIsUsed) {
|
||||
renderings.push(questionBox);
|
||||
}
|
||||
|
||||
|
||||
const hasMinimap = layerConfig.tagRenderings.some(tr => tr.hasMinimap())
|
||||
if(!hasMinimap){
|
||||
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")))
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (State.state.featureSwitchIsDebugging.data) {
|
||||
const config: TagRenderingConfig = new TagRenderingConfig({render: "{all_tags()}"}, new Tag("id", ""), "");
|
||||
renderings.push(new TagRenderingAnswer(tags, config))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue