Fix direction input element

This commit is contained in:
Pieter Vander Vennet 2021-08-26 16:24:18 +02:00
parent 61b6721342
commit 4a00c0e357
3 changed files with 25 additions and 7 deletions

22
test.ts
View file

@ -8,8 +8,28 @@ import {LocalStorageSource} from "./Logic/Web/LocalStorageSource";
import LZString from "lz-string";
import {LayoutConfigJson} from "./Models/ThemeConfig/Json/LayoutConfigJson";
import Combine from "./UI/Base/Combine";
import DirectionInput from "./UI/Input/DirectionInput";
import Loc from "./Models/Loc";
import AvailableBaseLayers from "./Logic/Actors/AvailableBaseLayers";
import Minimap from "./UI/Base/Minimap";
import ValidatedTextField from "./UI/Input/ValidatedTextField";
const location = new UIEventSource<Loc>({
zoom: 18,
lat: 51.2,
lon: 4.3
})
DirectionInput.constructMinimap = options => new Minimap(options)
new DirectionInput(
AvailableBaseLayers.SelectBestLayerAccordingTo(location, new UIEventSource<string | string[]>("map")),
location
).SetStyle("height: 250px; width: 250px")
.SetClass("block")
.AttachTo("maindiv")
/*
new VariableUiElement(Hash.hash.map(
hash => {
let json: {};
@ -28,4 +48,4 @@ new VariableUiElement(Hash.hash.map(
]).SetClass("flex flex-col m-1")
}
))
.AttachTo("maindiv")
.AttachTo("maindiv")*/