MapComplete/assets/layers/last_click/last_click.json

242 lines
6.9 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"id": "last_click",
"name": null,
"description": "This 'layer' is not really a layer, but contains part of the code how the popup to 'add a new marker' is displayed",
"source": "special",
"isShown": {
"and": [
{
"or": [
"has_note_layer=yes",
{
"and": [
"has_presets=yes",
"_addNewEnabled=yes"
]
}
]
},
{
"or": [
{
"and": [
"mouse_button=right",
"_usermode=button_click_right"
]
},
"_usermode=button_click",
"_usermode=click",
{
"and": [
"mouse_button=right",
"_usermode=click_right"
]
}
]
}
]
},
"title": {
"mappings": [
{
"if": {
"and": [
"has_note_layer=yes",
"has_presets=yes"
]
},
"then": {
"en": "Add a new point or add a note",
"ca": "Afegeix un nou punt o nota",
"cs": "Přidání nového bodu nebo přidání poznámky",
"da": "Tilføj et nyt punkt eller en note",
"de": "Objekt oder Hinweis auf der Karte hinzufügen",
"es": "Añadir un nuevo punto o añadir una nota",
"fr": "Ajouter un nouveau point ou ajouter une note",
"it": "Aggiungi un nuovo punto o una nota",
"nl": "Voeg een nieuw punt of een nieuwe kaartnota toe",
"pl": "Dodaj nowy punkt lub dodaj notatkę"
}
},
{
"if": "has_note_layer=yes",
"then": {
"en": "Add a new note",
"ca": "Afegeix una nova nota",
"cs": "Přidání nové poznámky",
"de": "Hinweis hinzufügen",
"es": "Añadir una nueva nota",
"fr": "Ajouter une nouvelle note",
"it": "Aggiungi una nuova nota",
"nl": "Voeg een nieuwe kaartnota toe",
"pl": "Dodaj nową notatkę"
}
},
{
"if": "has_presets=yes",
"then": {
"en": "Add a new point",
"ca": "Afegeix un nou punt",
"cs": "Přidání nového bodu",
"da": "Tilføj et nyt punkt",
"de": "Objekt hinzufügen",
"es": "Añadir un nuevo punto",
"fr": "Ajouter un nouveau point",
"it": "Aggiungi un nuovo punto",
"nl": "Voeg een nieuw punt toe",
"pl": "Dodaj nowy punkt"
}
}
]
},
"popupInFloatover": true,
"titleIcons": [],
"pointRendering": [
{
"marker": [
{
"icon": {
"mappings": [
{
"if": {
"and": [
"has_note_layer=yes",
"has_presets=no"
]
},
"then": "./assets/svg/note.svg"
},
{
"if": "number_of_presets=1",
"then": "{first_preset}"
}
],
"render": "<div class='relative'> <img src='./assets/svg/add_pin.svg' class='absolute' style='height: 50px'> <div class='absolute top-0 left-0 rounded-full overflow-hidden noselect' style='width: 40px; height: 40px'><div class='flex slide min-w-min' style='animation: slide linear {number_of_presets}s infinite; width: calc( (1 + {number_of_presets}) * 40px ); height: 40px'>{renderings}{first_preset}</div></div></div>"
}
}
],
"labelCssClasses": "text-sm min-w-min px-2 rounded-full text-white opacity-65 whitespace-nowrap block-ruby",
"labelCss": "background: #00000088",
"label": {
"render": {
"en": "Click here to add a new item",
"ca": "Afegir nou element",
"cs": "Klikněte zde pro přidání nové položky",
"da": "Klik her for at tilføje et nyt element",
"de": "Hier klicken, um ein neues Element hinzuzufügen",
"es": "Haz clic aquí para añadir un nuevo elemento",
"fil": "I-click ito para mag-dagdag ng bagong bagay",
"fr": "Cliquez ici pour ajouter un élément",
"hu": "Új elem hozzáadásához kattints ide",
"id": "Klik di sini untuk menambahkan item baru",
"it": "Clicca qui per aggiungere un nuovo elemento",
"nb_NO": "Legg til nytt element",
"nl": "Klik hier om een item toe te voegen",
"pl": "Kliknij tutaj, aby dodać nowy obiekt",
"pt": "Adicionar novo item",
"uk": "Натисніть тут, щоб додати новий об'єкт",
"zh_Hant": "點這邊新增新項目"
},
"mappings": [
{
"if": {
"and": [
"has_note_layer=yes",
"has_presets=no"
]
},
"then": {
"en": "Create a new map note",
"ca": "Crea una nova nota del mapa",
"cs": "Vytvoření nové mapové poznámky",
"de": "Hinweis auf der Karte hinzufügen",
"es": "Crear una nueva nota del mapa",
"fr": "Créer une nouvelle note de carte",
"it": "Crea una nuova nota sulla mappa",
"nl": "Maak een nieuwe kaartnotitie",
"pl": "Utwórz nową notatkę na mapie"
}
}
]
},
"iconBadges": [
{
"if": {
"or": [
"has_note_layer=yes",
"has_presets=yes"
]
},
"then": "<img class='animate-pulse' src='./assets/svg/addSmall.svg'>"
}
],
"location": [
"point"
],
"anchor": "bottom",
"iconSize": {
"mappings": [
{
"if": {
"and": [
"has_note_layer=yes",
"has_presets=no"
]
},
"then": "40,40"
}
],
"render": "40,50"
}
}
],
"lineRendering": [],
"tagRenderings": [
{
"id": "add_new",
"render": {
"*": "{add_new_point()}"
},
"condition": "has_presets=yes",
"classes": "max-h-leave-room special-add-new-point flex-1"
},
{
"id": "add_note",
"render": {
"*": "{open_note()}"
},
"condition": "has_note_layer=yes",
"classes": "flex-1"
},
{
"id": "nearby_images",
"render": {
"*": "{nearby_images(,true)}"
},
"classes": "w-fit self-end"
},
{
"id": "debug",
"render": "{all_tags()}",
"metacondition": "__featureSwitchIsDebugging=true"
}
],
"filter": [
{
"id": "action",
"options": [
{
"default": true,
"question": "only_if_action_is_possible",
"osmTags": {
"or": [
"has_note_layer=yes",
"has_presets=yes"
]
}
}
]
}
],
"allowMove": false
}