mapcomplete/test.ts

32 lines
979 B
TypeScript
Raw Normal View History

2020-07-21 00:07:04 +02:00
import {DropDown} from "./UI/Input/DropDown";
import Locale from "./UI/i18n/Locale";
import Combine from "./UI/Base/Combine";
import Translations from "./UI/i18n/Translations";
2020-07-21 23:31:41 +02:00
import {TagRenderingOptions} from "./Customizations/TagRendering";
import {UIEventSource} from "./UI/UIEventSource";
import {Tag} from "./Logic/TagsFilter";
import {Changes} from "./Logic/Changes";
import {OsmConnection} from "./Logic/OsmConnection";
import Translation from "./UI/i18n/Translation";
2020-07-21 00:07:04 +02:00
console.log("Hello world")
2020-07-21 23:31:41 +02:00
Locale.language.setData("en");
2020-07-21 00:07:04 +02:00
let languagePicker = new DropDown("", ["en", "nl"].map(lang => {
return {value: lang, shown: lang}
}
), Locale.language).AttachTo("maindiv");
2020-07-21 23:31:41 +02:00
let tags = new UIEventSource({
x:"y"
})
new TagRenderingOptions({
mappings: [{k: new Tag("x","y"), txt: new Translation({en: "ENG", nl: "NED"})}]
}).construct({
tags: tags,
changes: new Changes(
"cs",
new OsmConnection(true)
)
}).AttachTo("extradiv")