forked from MapComplete/MapComplete
Fix back button; add title
This commit is contained in:
parent
6e77504854
commit
2f57010202
14 changed files with 115 additions and 43 deletions
|
@ -19,7 +19,7 @@ export default class FullScreenMessageBox extends UIElement {
|
|||
if (State.state.fullScreenMessage.data === undefined) {
|
||||
return "";
|
||||
}
|
||||
this._content = State.state.fullScreenMessage.data;
|
||||
this._content = State.state.fullScreenMessage.data.content;
|
||||
return new Combine([this._content]).SetClass("fullscreenmessage-content").Render();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ import ScrollableFullScreen from "../Base/ScrollableFullScreen";
|
|||
export default class FeatureInfoBox extends UIElement {
|
||||
private _component: UIElement;
|
||||
|
||||
public title: UIEventSource<string> ;
|
||||
|
||||
constructor(
|
||||
tags: UIEventSource<any>,
|
||||
layerConfig: LayerConfig
|
||||
|
@ -24,6 +26,7 @@ export default class FeatureInfoBox extends UIElement {
|
|||
|
||||
const title = new TagRenderingAnswer(tags, layerConfig.title ?? new TagRenderingConfig("POI", undefined))
|
||||
.SetClass("featureinfobox-title");
|
||||
this.title = title;
|
||||
const titleIcons = new Combine(
|
||||
layerConfig.titleIcons.map(icon => new TagRenderingAnswer(tags, icon)))
|
||||
.SetClass("featureinfobox-icons");
|
||||
|
|
|
@ -154,7 +154,7 @@ export default class ShowDataLayer {
|
|||
this._onSelectedTrigger[feature.properties.id.replace("/","_")] = this._onSelectedTrigger[id];
|
||||
if (feature.properties.id.replace(/\//g, "_") === Hash.hash.data) {
|
||||
// This element is in the URL, so this is a share link
|
||||
// We already open it
|
||||
// We open the relevant popup straight away
|
||||
uiElement.Activate();
|
||||
popup.setContent(uiElement.Render());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue