2020-07-01 15:38:48 +00:00
|
|
|
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 11:28:45 +00:00
|
|
|
import {UIRadioButton} from "./UI/Base/UIRadioButton";
|
|
|
|
import {FixedInputElement} from "./UI/Base/FixedInputElement";
|
|
|
|
import {TextField} from "./UI/Base/TextField";
|
2020-07-01 00:12:33 +00:00
|
|
|
|
2020-07-15 11:15:36 +00:00
|
|
|
|
2020-07-20 11:28:45 +00:00
|
|
|
const buttons = new UIRadioButton<number>(
|
|
|
|
[new FixedInputElement("Five", 5),
|
|
|
|
new FixedInputElement("Ten", 10),
|
|
|
|
new TextField<number>({
|
|
|
|
fromString: (str) => parseInt(str),
|
|
|
|
toString: (i) => ("" + i),
|
|
|
|
})
|
|
|
|
]
|
|
|
|
).AttachTo("maindiv");
|
2020-07-15 11:15:36 +00:00
|
|
|
|
2020-07-20 11:28:45 +00:00
|
|
|
buttons.GetValue().addCallback(console.log);
|
|
|
|
buttons.GetValue().setData(10)
|
2020-07-15 11:15:36 +00:00
|
|
|
|
2020-07-20 11:28:45 +00:00
|
|
|
const value = new TextField<number>({
|
|
|
|
fromString: (str) => parseInt(str),
|
|
|
|
toString: (i) => {
|
|
|
|
if(isNaN(i)){
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return ("" + i)
|
|
|
|
},
|
|
|
|
}).AttachTo("extradiv").GetValue();
|
|
|
|
|
|
|
|
value.setData(42);
|
|
|
|
value.addCallback(console.log)
|