mapcomplete/test.ts

24 lines
905 B
TypeScript
Raw Normal View History

2020-07-29 20:09:25 +02:00
import {FeatureInfoBox} from "./UI/FeatureInfoBox";
import {TagRenderingOptions} from "./Customizations/TagRendering";
import {Changes} from "./Logic/Changes";
2020-07-29 15:48:21 +02:00
import {UIEventSource} from "./UI/UIEventSource";
2020-07-29 20:09:25 +02:00
import {OsmConnection} from "./Logic/OsmConnection";
import {ElementStorage} from "./Logic/ElementStorage";
import {Tag} from "./Logic/TagsFilter";
import FixedText from "./Customizations/Questions/FixedText";
import {FixedUiElement} from "./UI/Base/FixedUiElement";
2020-07-29 15:05:19 +02:00
2020-07-29 20:09:25 +02:00
const osm = new OsmConnection(true);
const changes = new Changes("test", osm, new ElementStorage());
const tags = new UIEventSource<any>({name: "<b>ESCAPEE <h3>"});
const x = new TagRenderingOptions(
{
mappings: [
{k: null, txt: "Test: {name}"}
]
}
);
new FeatureInfoBox(undefined, tags, new FixedText(new FixedUiElement("{name}")), [x], changes, osm.userDetails)
.AttachTo("maindiv");