mapcomplete/test.ts

21 lines
685 B
TypeScript
Raw Normal View History

import {UIEventSource} from "./UI/UIEventSource";
2020-07-05 18:59:47 +02:00
import {Changes} from "./Logic/Changes";
import {OsmConnection} from "./Logic/OsmConnection";
import {ElementStorage} from "./Logic/ElementStorage";
import {WikipediaLink} from "./Customizations/Questions/WikipediaLink";
import {OsmLink} from "./Customizations/Questions/OsmLink";
2020-07-01 02:12:33 +02:00
2020-07-05 18:59:47 +02:00
const tags = {name: "Test",
wikipedia: "nl:Pieter",
id: "node/-1"};
const tagsES = new UIEventSource(tags);
2020-07-01 02:12:33 +02:00
2020-07-05 18:59:47 +02:00
const login = new OsmConnection(true);
2020-07-01 02:12:33 +02:00
2020-07-05 18:59:47 +02:00
const allElements = new ElementStorage();
allElements.addElementById(tags.id, tagsES);
2020-07-01 02:12:33 +02:00
2020-07-05 18:59:47 +02:00
const changes = new Changes("Test", login, allElements)
2020-07-01 02:12:33 +02:00
2020-07-05 18:59:47 +02:00
new OsmLink(tagsES, changes).AttachTo("maindiv");