mapcomplete/customGenerator.ts

14 lines
647 B
TypeScript
Raw Normal View History

2020-08-08 19:17:17 +00:00
import {OsmConnection, UserDetails} from "./Logic/Osm/OsmConnection";
import {VariableUiElement} from "./UI/Base/VariableUIElement";
import {UIEventSource} from "./Logic/UIEventSource";
import {ThemeGenerator} from "./UI/CustomThemeGenerator/ThemeGenerator";
import {Preview} from "./UI/CustomThemeGenerator/Preview";
2020-08-08 19:17:17 +00:00
const connection = new OsmConnection(true, new UIEventSource<string>(undefined), false);
connection.AttemptLogin();
const themeGenerator = new ThemeGenerator(connection, window.location.hash?.substr(1));
themeGenerator.AttachTo("layoutCreator")
2020-08-08 19:49:39 +00:00
new Preview(themeGenerator.url, themeGenerator.themeObject).AttachTo("preview");