forked from MapComplete/MapComplete
Fix image carousel bug
This commit is contained in:
parent
c226e15d99
commit
a19f3e61f9
7 changed files with 43 additions and 58 deletions
46
test.ts
46
test.ts
|
@ -2,47 +2,19 @@
|
|||
|
||||
|
||||
import {UIEventSource} from "./Logic/UIEventSource";
|
||||
import {TagRenderingConfigJson} from "./Customizations/JSON/TagRenderingConfigJson";
|
||||
import TagRenderingConfig from "./Customizations/JSON/TagRenderingConfig";
|
||||
import Locale from "./UI/i18n/Locale";
|
||||
import EditableTagRendering from "./UI/Popup/EditableTagRendering";
|
||||
import TagRenderingQuestion from "./UI/Popup/TagRenderingQuestion";
|
||||
import {FeatureInfoBox} from "./UI/Popup/FeatureInfoBox";
|
||||
import SharedLayers from "./Customizations/SharedLayers";
|
||||
|
||||
const tagRendering: TagRenderingConfigJson = {
|
||||
question: {"en": "What is the name of?", nl: "Wat is de naam van?", fr: "C'est quoi le nom"},
|
||||
mappings: [
|
||||
{
|
||||
if: "valves=A",
|
||||
then: "A"
|
||||
},
|
||||
{
|
||||
if: "valves=B",
|
||||
then: "B"
|
||||
},
|
||||
{
|
||||
if: "valves=C",
|
||||
then: "C"
|
||||
}, {
|
||||
if: "valves:special=A",
|
||||
then: "SPecial"
|
||||
}
|
||||
],
|
||||
render: "Valves: {valves}",
|
||||
multiAnswer: true,
|
||||
freeform: {
|
||||
key: "valves",
|
||||
type: "string",
|
||||
addExtraTags: ["fixme=valves"]
|
||||
}
|
||||
const tags = {
|
||||
mapillary: "wweALGY5g8_T8UjGkcWCfw",
|
||||
wikimedia_commons: "File:Boekenkast Sint-Lodewijks.jpg"
|
||||
}
|
||||
const src = new UIEventSource(tags);
|
||||
|
||||
const config = new TagRenderingConfig(tagRendering)
|
||||
new FeatureInfoBox(src, SharedLayers.sharedLayers["ghost_bike"]).AttachTo('maindiv');
|
||||
|
||||
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")
|
||||
//const subs = new SubstitutedTranslation(new Translation({"nl":"NL {image_carousel()} {image_upload()}"}), src)
|
||||
//subs.AttachTo("maindiv")
|
||||
/*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue