mapcomplete/assets/layers/last_click/last_click.json

228 lines
6.5 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",
"nl": "Voeg een nieuw punt of een nieuwe kaartnota toe",
"de": "Objekt oder Hinweis auf der Karte hinzufügen",
"ca": "Afegeix un nou punt o nota",
"fr": "Ajouter un nouveau point ou ajouter une note",
"pl": "Dodaj nowy punkt lub dodaj notatkę",
"cs": "Přidání nového bodu nebo přidání poznámky",
"es": "Añadir un nuevo punto o añadir una nota"
}
},
{
"if": "has_note_layer=yes",
"then": {
"en": "Add a new note",
"nl": "Voeg een nieuwe kaartnota toe",
"de": "Hinweis hinzufügen",
"ca": "Afegeix una nova nota",
"fr": "Ajouter une nouvelle note",
"pl": "Dodaj nową notatkę",
"cs": "Přidání nové poznámky",
"es": "Añadir una nueva nota"
}
},
{
"if": "has_presets=yes",
"then": {
"en": "Add a new point",
"nl": "Voeg een nieuw punt toe",
"de": "Objekt hinzufügen",
"ca": "Afegeix un nou punt",
"fr": "Ajouter un nouveau point",
"pl": "Dodaj nowy punkt",
"cs": "Přidání nového bodu",
"es": "Añadir un nuevo punto"
}
}
]
},
"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": {
"ca": "Afegir nou element",
"cs": "Klikněte zde pro přidání nové položky",
"da": "Klik her for at tilføje et nyt punkt",
"de": "Hier klicken, um ein neues Element hinzuzufügen",
"en": "Click here to add a new item",
"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": "Aggiungi nuovo elemento",
"nb_NO": "Legg til nytt element",
"nl": "Klik hier om een item toe te voegen",
"pt": "Adicionar novo item",
"zh_Hant": "點這邊新增新項目",
"pl": "Kliknij tutaj, aby dodać nowy obiekt",
"uk": "Натисніть тут, щоб додати новий об'єкт"
},
"mappings": [
{
"if": {
"and": [
"has_note_layer=yes",
"has_presets=no"
]
},
"then": {
"en": "Create a new map note",
"nl": "Maak een nieuwe kaartnotitie",
"de": "Hinweis auf der Karte hinzufügen",
"ca": "Crea una nova nota del mapa",
"fr": "Créer une nouvelle note de carte",
"pl": "Utwórz nową notatkę na mapie",
"cs": "Vytvoření nové mapové poznámky",
"es": "Crear una nueva nota del mapa"
}
}
]
},
"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",
"classes": "h-full flex special-add-new-point",
"condition": "has_presets=yes",
"render": {
"*": "{add_new_point()}"
}
},
{
"id": "add_note",
"condition": "has_note_layer=yes",
"render": {
"*": "{open_note()}"
}
},
{
"id": "debug",
"metacondition": "__featureSwitchIsDebugging=true",
"render": "{all_tags()}"
}
],
"filter": [
{
"id": "action",
"options": [
{
"default": true,
"question": "only_if_action_is_possible",
"osmTags": {
"or": [
"has_note_layer=yes",
"has_presets=yes"
]
}
}
]
}
],
"allowMove": false
}