Add buttons to quickly swap background layers (also in the locationInput), move copyright into home panel, split privacy policy to seperate welcome message tab

This commit is contained in:
Pieter Vander Vennet 2021-11-21 02:44:35 +01:00
parent 1d0fbe701c
commit 37c0129a6d
22 changed files with 477 additions and 183 deletions

20
test.ts
View file

@ -3,12 +3,22 @@ import {UIEventSource} from "./Logic/UIEventSource";
import Loc from "./Models/Loc";
import AvailableBaseLayersImplementation from "./Logic/Actors/AvailableBaseLayersImplementation";
import AvailableBaseLayers from "./Logic/Actors/AvailableBaseLayers";
AvailableBaseLayers.implement(new AvailableBaseLayersImplementation())
import BaseLayer from "./Models/BaseLayer";
import {VariableUiElement} from "./UI/Base/VariableUIElement";
new BackgroundMapSwitch({
AvailableBaseLayers.implement(new AvailableBaseLayersImplementation())
const state = {
currentBackground: new UIEventSource<BaseLayer>(AvailableBaseLayers.osmCarto),
locationControl: new UIEventSource<Loc>({
zoom: 19,
lat: 51.5,
lon: 4.1
lat: 51.2,
lon: 3.2
})
}).AttachTo("maindiv")
}
const actualBackground = new UIEventSource(AvailableBaseLayers.osmCarto)
new BackgroundMapSwitch(state,
{
currentBackground: actualBackground
}).AttachTo("maindiv")
new VariableUiElement(actualBackground.map(bg => bg.id)).AttachTo("extradiv")