mapcomplete/test.ts

25 lines
980 B
TypeScript
Raw Normal View History

import {UIEventSource} from "./UI/UIEventSource";
2020-07-05 16:59:47 +00: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-08 09:23:36 +00:00
import {ConfirmDialog} from "./UI/ConfirmDialog";
2020-07-08 13:09:34 +00:00
import {Imgur} from "./Logic/Imgur";
2020-07-15 11:15:36 +00:00
import {VariableUiElement} from "./UI/Base/VariableUIElement";
2020-07-20 13:54:50 +00:00
import {TextField} from "./UI/Input/TextField";
import {FixedInputElement} from "./UI/Input/FixedInputElement";
import {RadioButton} from "./UI/Input/RadioButton";
2020-07-01 00:12:33 +00:00
2020-07-15 11:15:36 +00:00
2020-07-20 13:54:50 +00:00
const buttons = new RadioButton<number>(
2020-07-20 11:28:45 +00:00
[new FixedInputElement("Five", 5),
new FixedInputElement("Ten", 10),
new TextField<number>({
fromString: (str) => parseInt(str),
toString: (i) => ("" + i),
})
2020-07-20 13:54:50 +00:00
], false
2020-07-20 11:28:45 +00:00
).AttachTo("maindiv");
2020-07-15 11:15:36 +00:00
2020-07-20 13:54:50 +00:00
buttons.GetValue().addCallback(console.log);