2020-10-27 01:01:34 +01:00
|
|
|
//*
|
2020-08-31 02:59:47 +02:00
|
|
|
|
2020-10-09 21:11:52 +02:00
|
|
|
|
2020-10-23 01:20:48 +02:00
|
|
|
import {UIEventSource} from "./Logic/UIEventSource";
|
2020-10-27 01:01:34 +01:00
|
|
|
import {TagRenderingConfigJson} from "./Customizations/JSON/TagRenderingConfigJson";
|
|
|
|
import TagRenderingConfig from "./Customizations/JSON/TagRenderingConfig";
|
|
|
|
import Locale from "./UI/i18n/Locale";
|
|
|
|
import EditableTagRendering from "./UI/Popup/EditableTagRendering";
|
|
|
|
|
|
|
|
const tagRendering: TagRenderingConfigJson = {
|
|
|
|
question: {"en": "What is the name of?", nl: "Wat is de naam van?", fr: "C'est quoi le nom"},
|
|
|
|
mappings: [
|
|
|
|
{
|
|
|
|
if: "noname=yes",
|
|
|
|
then: "Has no name"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
render: "The name is {name}",
|
|
|
|
freeform: {
|
|
|
|
key: "name",
|
|
|
|
type: "string",
|
|
|
|
addExtraTags: ["noname="]
|
|
|
|
}//*/
|
|
|
|
}
|
|
|
|
|
|
|
|
const config = new TagRenderingConfig(tagRendering)
|
|
|
|
|
|
|
|
const tags = new UIEventSource({id: "node/-1", "amenity": "bench", name: "pietervdvn"})
|
|
|
|
|
|
|
|
// new TagRenderingQuestion(tags, config).AttachTo("maindiv")
|
|
|
|
new EditableTagRendering(tags, config).AttachTo('maindiv')
|
|
|
|
Locale.CreateLanguagePicker(["nl", "en", "fr"]).AttachTo("extradiv")
|
2020-10-06 01:37:02 +02:00
|
|
|
/*/
|
2020-10-02 19:00:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
import {Utils} from "./Utils";
|
|
|
|
import {FixedUiElement} from "./UI/Base/FixedUiElement";
|
|
|
|
|
|
|
|
Utils.generateStats((stats) => {
|
2020-10-06 01:37:02 +02:00
|
|
|
new FixedUiElement(stats).AttachTo('maindiv')
|
2020-10-02 19:00:24 +02:00
|
|
|
})
|
|
|
|
//*/
|