Add return to map button on layer panel
This commit is contained in:
parent
8e55799c4f
commit
7dc7cc283d
4 changed files with 20 additions and 6 deletions
10
Svg.ts
10
Svg.ts
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@ import State from "../../State";
|
||||||
import BackgroundSelector from "./BackgroundSelector";
|
import BackgroundSelector from "./BackgroundSelector";
|
||||||
import LayerSelection from "./LayerSelection";
|
import LayerSelection from "./LayerSelection";
|
||||||
import Combine from "../Base/Combine";
|
import Combine from "../Base/Combine";
|
||||||
|
import Translations from "../i18n/Translations";
|
||||||
|
|
||||||
export default class LayerControlPanel extends UIElement{
|
export default class LayerControlPanel extends UIElement{
|
||||||
private readonly _panel: UIElement;
|
private readonly _panel: UIElement;
|
||||||
|
@ -23,6 +24,17 @@ export default class LayerControlPanel extends UIElement{
|
||||||
layerSelection.onClick(() => { });
|
layerSelection.onClick(() => { });
|
||||||
layerControlPanel = new Combine([layerSelection, "<br/>", layerControlPanel]);
|
layerControlPanel = new Combine([layerSelection, "<br/>", layerControlPanel]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const backButton = new Combine([
|
||||||
|
new Combine([Translations.t.general.returnToTheMap.Clone().SetClass("to-the-map")])
|
||||||
|
.SetClass("to-the-map-inner")
|
||||||
|
|
||||||
|
]).SetClass("only-on-mobile")
|
||||||
|
.onClick(() => State.state.fullScreenMessage.setData(undefined));
|
||||||
|
|
||||||
|
layerControlPanel = new Combine([layerControlPanel, backButton]);
|
||||||
|
|
||||||
this._panel = layerControlPanel;
|
this._panel = layerControlPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@ import Combine from "../Base/Combine";
|
||||||
import {FixedUiElement} from "../Base/FixedUiElement";
|
import {FixedUiElement} from "../Base/FixedUiElement";
|
||||||
import Translations from "../i18n/Translations";
|
import Translations from "../i18n/Translations";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows the panel with all layers and a toggle for each of them
|
||||||
|
*/
|
||||||
export default class LayerSelection extends UIElement {
|
export default class LayerSelection extends UIElement {
|
||||||
|
|
||||||
private readonly _checkboxes: UIElement[];
|
private readonly _checkboxes: UIElement[];
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue