mapcomplete/test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.4 KiB
TypeScript
Raw Normal View History

import SvelteUIElement from "./UI/Base/SvelteUIElement"
2023-03-24 19:21:15 +01:00
import ThemeViewGUI from "./UI/ThemeViewGUI.svelte"
import { FixedUiElement } from "./UI/Base/FixedUiElement"
2023-03-25 02:48:24 +01:00
import LayoutConfig from "./Models/ThemeConfig/LayoutConfig"
2023-03-29 17:21:20 +02:00
import * as benches from "./assets/generated/themes/cyclofix.json"
import { UIEventSource } from "./Logic/UIEventSource"
import ThemeViewState from "./Models/ThemeViewState"
import { SpecialVisualization, SpecialVisualizationState } from "./UI/SpecialVisualization"
import { Feature } from "geojson"
import Combine from "./UI/Base/Combine"
import SpecialVisualizations from "./UI/SpecialVisualizations"
import BaseUIElement from "./UI/BaseUIElement"
async function main() {
new FixedUiElement("").AttachTo("extradiv")
2023-03-25 02:48:24 +01:00
const layout = new LayoutConfig(<any>benches, true) // qp.data === "" ? : new AllKnownLayoutsLazy().get(qp.data)
2023-03-29 17:21:20 +02:00
const main = new SvelteUIElement(ThemeViewGUI, { layout })
main.AttachTo("maindiv")
}
2023-03-28 05:13:48 +02:00
async function test() {
2023-03-29 17:21:20 +02:00
const layout = new LayoutConfig(<any>benches, true) // qp.data === "" ? : new AllKnownLayoutsLazy().get(qp.data)
const state = new ThemeViewState(layout)
const all = SpecialVisualizations.specialVisualizations.map((s) =>
SpecialVisualizations.renderExampleOfSpecial(state, s)
)
new Combine(all).AttachTo("maindiv")
2023-03-28 05:13:48 +02:00
}
2023-03-29 17:21:20 +02:00
// test().then((_) => {}) /*/
main().then((_) => {}) //*/