From 896e9c8e609c8f2f70093fafd84df55c0f7af46b Mon Sep 17 00:00:00 2001 From: rldhont Date: Tue, 9 Jul 2024 16:21:29 +0200 Subject: [PATCH 1/5] JS Digitizing component: measure attribute To enable measure with digitizing component, the attribute measure has to be added. --- assets/src/components/Digitizing.js | 2 +- lizmap/modules/view/templates/map_draw.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/src/components/Digitizing.js b/assets/src/components/Digitizing.js index 0873a3c8df..110a27baf0 100644 --- a/assets/src/components/Digitizing.js +++ b/assets/src/components/Digitizing.js @@ -114,7 +114,7 @@ export default class Digitizing extends HTMLElement { - + @@ -213,10 +219,17 @@ export default class Digitizing extends HTMLElement { () => { render(mainTemplate(), this); }, - ['digitizing.featureDrawn', 'digitizing.visibility', 'digitizing.toolSelected', 'digitizing.editionBegins', 'digitizing.editionEnds', 'digitizing.erasingBegins', 'digitizing.erasingEnds', 'digitizing.erase', 'digitizing.drawColor', 'digitizing.save', 'digitizing.measure', 'digitizing.editedFeatureText', 'digitizing.editedFeatureRotation', 'digitizing.editedFeatureScale'] + ['digitizing.featureDrawn', 'digitizing.visibility', 'digitizing.toolSelected', 'digitizing.editionBegins', 'digitizing.editionEnds', 'digitizing.erasingBegins', 'digitizing.erasingEnds', 'digitizing.erase', 'digitizing.erase.all', 'digitizing.drawColor', 'digitizing.save', 'digitizing.measure', 'digitizing.editedFeatureText', 'digitizing.editedFeatureRotation', 'digitizing.editedFeatureScale'] ); } disconnectedCallback() { } + + eraseAll() { + if (!confirm(lizDict['digitizing.confirm.erase.all'])) { + return false; + } + mainLizmap.digitizing.eraseAll(); + } } diff --git a/assets/src/images/svg/eraser-all.svg b/assets/src/images/svg/eraser-all.svg new file mode 100644 index 0000000000..57115493f4 --- /dev/null +++ b/assets/src/images/svg/eraser-all.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/src/modules/Digitizing.js b/assets/src/modules/Digitizing.js index 950f777827..cf7b41ec0d 100644 --- a/assets/src/modules/Digitizing.js +++ b/assets/src/modules/Digitizing.js @@ -345,7 +345,7 @@ export default class Digitizing { } else { this._contextFeatures[this._context] = null; } - this._isSaved = false; + this._isSaved = (localStorage.getItem(this._repoAndProjectString + '_' + this._context + '_drawLayer') !== null); this._measureTooltips.forEach((measureTooltip) => { mainLizmap.map.removeOverlay(measureTooltip[0]); mainLizmap.map.removeOverlay(measureTooltip[1]); @@ -990,6 +990,20 @@ export default class Digitizing { mainEventDispatcher.dispatch('digitizing.save'); } + eraseAll() { + this._measureTooltips.forEach((measureTooltip) => { + mainLizmap.map.removeOverlay(measureTooltip[0]); + mainLizmap.map.removeOverlay(measureTooltip[1]); + this._measureTooltips.delete(measureTooltip); + }); + this._drawSource.clear(); + + this.saveFeatureDrawn(); + + mainEventDispatcher.dispatch('digitizing.erase.all'); + mainEventDispatcher.dispatch('digitizing.erase'); + } + /** * Save all drawn features in local storage */ @@ -1088,6 +1102,7 @@ export default class Digitizing { // Draw features this._drawSource.addFeatures(loadedFeatures); + this._isSaved = (loadedFeatures.length > 0); } } diff --git a/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties b/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties index 9989b218a4..3c8815f2d9 100644 --- a/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties +++ b/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties @@ -218,7 +218,9 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features +digitizing.toolbar.erase.all=Delete all features digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase.all=Are you sure you want to delete all features? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Measures From 9e84b0695980df18e44be77031770f700e6920e2 Mon Sep 17 00:00:00 2001 From: rldhont Date: Wed, 10 Jul 2024 14:38:00 +0200 Subject: [PATCH 3/5] JS Digitizing fix locale key confirm erase Replace `digitizing.confirme.erase` by `digitizing.confirm.erase` --- assets/src/modules/Digitizing.js | 2 +- .../app/locales/cs_CZ/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/de_DE/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/el_GR/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/es_ES/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/eu_ES/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/fi_FI/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/fr_FR/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/gl_ES/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/hu_HU/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/it_IT/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/ja_JP/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/nl_NL/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/no_NO/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/pl_PL/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/pt_BR/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/pt_PT/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/ro_RO/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/ru_RU/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/sk_SK/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/sl_SI/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/sv_SE/view/locales/dictionnary.UTF-8.properties | 2 +- .../app/locales/uk_UA/view/locales/dictionnary.UTF-8.properties | 2 +- lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/assets/src/modules/Digitizing.js b/assets/src/modules/Digitizing.js index cf7b41ec0d..d4bbbb59e4 100644 --- a/assets/src/modules/Digitizing.js +++ b/assets/src/modules/Digitizing.js @@ -577,7 +577,7 @@ export default class Digitizing { hitTolerance: 8 }); if(features.length){ - if (!confirm(lizDict['digitizing.confirme.erase'])) { + if (!confirm(lizDict['digitizing.confirm.erase'])) { return false; } diff --git a/lizmap/app/locales/cs_CZ/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/cs_CZ/view/locales/dictionnary.UTF-8.properties index ccf4cad355..6496ec7307 100644 --- a/lizmap/app/locales/cs_CZ/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/cs_CZ/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Velikost digitizing.toolbar.import=Importovat v GeoJSON, GPX nebo KML digitizing.toolbar.edit=Upravte ( podržte klávesu "Shift" pro výběr více funkcí) digitizing.toolbar.erase=Smazat některé funkce -digitizing.confirme.erase=Opravdu chcete smazat tuto funkci? +digitizing.confirm.erase=Opravdu chcete smazat tuto funkci? digitizing.toolbar.save=Uložit kresbu v prohlížeči digitizing.toolbar.measure=Měření digitizing.constraint.title=Omezení diff --git a/lizmap/app/locales/de_DE/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/de_DE/view/locales/dictionnary.UTF-8.properties index c3e3756f16..5d06fa43bc 100644 --- a/lizmap/app/locales/de_DE/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/de_DE/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=GeoJSON, GPX oder KML importieren digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Zeichnung im Browser speichern digitizing.toolbar.measure=Grössen digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/el_GR/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/el_GR/view/locales/dictionnary.UTF-8.properties index 5ec1f0135a..ddae540852 100644 --- a/lizmap/app/locales/el_GR/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/el_GR/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Measures digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/es_ES/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/es_ES/view/locales/dictionnary.UTF-8.properties index 82af2271ab..5aa92744a7 100644 --- a/lizmap/app/locales/es_ES/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/es_ES/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Importación en GeoJSON, GPX o KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Medidas digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/eu_ES/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/eu_ES/view/locales/dictionnary.UTF-8.properties index 22ed217f28..32bd5c5edd 100644 --- a/lizmap/app/locales/eu_ES/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/eu_ES/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Measures digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/fi_FI/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/fi_FI/view/locales/dictionnary.UTF-8.properties index 6953d65209..5f9eb136b0 100644 --- a/lizmap/app/locales/fi_FI/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/fi_FI/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Mitat digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/fr_FR/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/fr_FR/view/locales/dictionnary.UTF-8.properties index 2e2064db74..b3cca59663 100644 --- a/lizmap/app/locales/fr_FR/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/fr_FR/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Taille digitizing.toolbar.import=Import en GeoJSON, GPX ou KML digitizing.toolbar.edit=Éditer (maintenir "Shift" pour sélectionner plusieurs entités) digitizing.toolbar.erase=Supprimer quelques entités -digitizing.confirme.erase=Êtes-vous certain de vouloir supprimer cet entité ? +digitizing.confirm.erase=Êtes-vous certain de vouloir supprimer cet entité ? digitizing.toolbar.save=Sauvegarder le dessin dans le navigateur digitizing.toolbar.measure=Mesures digitizing.constraint.title=Contraintes diff --git a/lizmap/app/locales/gl_ES/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/gl_ES/view/locales/dictionnary.UTF-8.properties index 35fee18201..233d50a0a1 100644 --- a/lizmap/app/locales/gl_ES/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/gl_ES/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Importar en GeoJSON, GPX ou KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Garde o debuxo no navegador digitizing.toolbar.measure=Medidas digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/hu_HU/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/hu_HU/view/locales/dictionnary.UTF-8.properties index 20c8ef6a71..27b0c3d2b9 100644 --- a/lizmap/app/locales/hu_HU/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/hu_HU/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Mérések digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/it_IT/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/it_IT/view/locales/dictionnary.UTF-8.properties index 5418bb25ea..2a9e85869b 100644 --- a/lizmap/app/locales/it_IT/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/it_IT/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Dimensione digitizing.toolbar.import=Importa in GeoJSON, GPX o KML digitizing.toolbar.edit=Modifica (tieni premuto il tasto "Shift" per selezionare più elementi) digitizing.toolbar.erase=Elimina alcuni elementi -digitizing.confirme.erase=Sei sicuro di voler eliminare questo elemento? +digitizing.confirm.erase=Sei sicuro di voler eliminare questo elemento? digitizing.toolbar.save=Salva il disegno nel browser digitizing.toolbar.measure=Misure digitizing.constraint.title=Vincoli diff --git a/lizmap/app/locales/ja_JP/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/ja_JP/view/locales/dictionnary.UTF-8.properties index 2410d1ee40..31b5529db7 100644 --- a/lizmap/app/locales/ja_JP/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/ja_JP/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=GeoJSON、GPX または KML でのインポート‎ digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=‎ブラウザで描画を保存する‎ digitizing.toolbar.measure=計測 digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/nl_NL/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/nl_NL/view/locales/dictionnary.UTF-8.properties index bb385c2a9b..bd28a9d33e 100644 --- a/lizmap/app/locales/nl_NL/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/nl_NL/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Grootte digitizing.toolbar.import=Importeer in GeoJSON, GPX or KML digitizing.toolbar.edit=Bewerken (houd 'Shift' ingedrukt om meerdere objecten te selecteren) digitizing.toolbar.erase=Verwijder enkele functies -digitizing.confirme.erase=Weet u zeker dat u deze functie wilt verwijderen? +digitizing.confirm.erase=Weet u zeker dat u deze functie wilt verwijderen? digitizing.toolbar.save=Sla tekening op in de browser digitizing.toolbar.measure=Eenheden digitizing.constraint.title=Beperkingen diff --git a/lizmap/app/locales/no_NO/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/no_NO/view/locales/dictionnary.UTF-8.properties index 0ec279dd2f..f58822768b 100644 --- a/lizmap/app/locales/no_NO/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/no_NO/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Measures digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/pl_PL/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/pl_PL/view/locales/dictionnary.UTF-8.properties index 6345413c4d..a641c92f86 100644 --- a/lizmap/app/locales/pl_PL/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/pl_PL/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Rozmiar digitizing.toolbar.import=Importuj GeoJSON, GPX lub KML digitizing.toolbar.edit=Edytuj (przytrzymaj „Shift”, aby wybrać wiele funkcji) digitizing.toolbar.erase=Usuń niektóre obiekty -digitizing.confirme.erase=Czy na pewno chcesz usunąć ten obiekt? +digitizing.confirm.erase=Czy na pewno chcesz usunąć ten obiekt? digitizing.toolbar.save=Zapisz rysunek w przeglądarce digitizing.toolbar.measure=Pomiary digitizing.constraint.title=Wymagania diff --git a/lizmap/app/locales/pt_BR/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/pt_BR/view/locales/dictionnary.UTF-8.properties index e369fd83e9..826513f6dd 100644 --- a/lizmap/app/locales/pt_BR/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/pt_BR/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Medidas digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/pt_PT/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/pt_PT/view/locales/dictionnary.UTF-8.properties index c16aae71c2..309320ad1f 100644 --- a/lizmap/app/locales/pt_PT/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/pt_PT/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Tamanho digitizing.toolbar.import=Importar GeoJSON, GPX ou KML digitizing.toolbar.edit=Editar (manter pressionada a tecla "Shift" para selecionar vários elementos) digitizing.toolbar.erase=Eliminar alguns elementos -digitizing.confirme.erase=Tem a certeza que pretende eliminar este elemento? +digitizing.confirm.erase=Tem a certeza que pretende eliminar este elemento? digitizing.toolbar.save=Guardar o desenho no browser digitizing.toolbar.measure=Medições digitizing.constraint.title=Restrições diff --git a/lizmap/app/locales/ro_RO/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/ro_RO/view/locales/dictionnary.UTF-8.properties index 14e4cbba98..a065f51c4b 100644 --- a/lizmap/app/locales/ro_RO/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/ro_RO/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Dimensiune digitizing.toolbar.import=Importare GeoJSON, GPX sau KML digitizing.toolbar.edit=Editează (ține apăsată tasta "Shift" pentru a selecta mai multe obiecte) digitizing.toolbar.erase=Șterge unele obiecte -digitizing.confirme.erase=Sigur dorești să ștergi acest obiect? +digitizing.confirm.erase=Sigur dorești să ștergi acest obiect? digitizing.toolbar.save=Salvare desen în browser digitizing.toolbar.measure=Măsurări digitizing.constraint.title=Constrângeri diff --git a/lizmap/app/locales/ru_RU/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/ru_RU/view/locales/dictionnary.UTF-8.properties index b24cd5e9c7..64812e8a51 100644 --- a/lizmap/app/locales/ru_RU/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/ru_RU/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Импорт в GeoJSON, GPX или KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Сохранить чертеж в браузере digitizing.toolbar.measure=Измерения digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/sk_SK/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/sk_SK/view/locales/dictionnary.UTF-8.properties index a8d19fa76e..5a84ec0462 100644 --- a/lizmap/app/locales/sk_SK/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/sk_SK/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Importujte v GeoJSON, GPX alebo KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Miery digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/sl_SI/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/sl_SI/view/locales/dictionnary.UTF-8.properties index ea667283ba..5d9d9b82ec 100644 --- a/lizmap/app/locales/sl_SI/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/sl_SI/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Velikost digitizing.toolbar.import=Uvozite v GeoJSON, GPX ali KML digitizing.toolbar.edit=Urejanje (z "Shift" izberete več elementov) digitizing.toolbar.erase=Izbrišite elemente -digitizing.confirme.erase=Želite izbrisati element? +digitizing.confirm.erase=Želite izbrisati element? digitizing.toolbar.save=Shranite sliko v brskalniku digitizing.toolbar.measure=Ukrepi digitizing.constraint.title=Relacije diff --git a/lizmap/app/locales/sv_SE/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/sv_SE/view/locales/dictionnary.UTF-8.properties index a96c7ade16..8c0016ab9f 100644 --- a/lizmap/app/locales/sv_SE/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/sv_SE/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Importera från GeoJSON. GPX eller KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Spara ritningen i webbläsaren digitizing.toolbar.measure=Mätningar digitizing.constraint.title=Constraints diff --git a/lizmap/app/locales/uk_UA/view/locales/dictionnary.UTF-8.properties b/lizmap/app/locales/uk_UA/view/locales/dictionnary.UTF-8.properties index 15c5f787cb..20db272abc 100644 --- a/lizmap/app/locales/uk_UA/view/locales/dictionnary.UTF-8.properties +++ b/lizmap/app/locales/uk_UA/view/locales/dictionnary.UTF-8.properties @@ -192,7 +192,7 @@ digitizing.toolbar.textScale=Size digitizing.toolbar.import=Імпорт в GeoJSON, GPX або KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.toolbar.save=Збережіть малюнок у браузері digitizing.toolbar.measure=Заходи digitizing.constraint.title=Constraints diff --git a/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties b/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties index 3c8815f2d9..f5ee69d767 100644 --- a/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties +++ b/lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties @@ -219,7 +219,7 @@ digitizing.toolbar.import=Import in GeoJSON, GPX or KML digitizing.toolbar.edit=Edit (hold "Shift" to select multiple features) digitizing.toolbar.erase=Delete some features digitizing.toolbar.erase.all=Delete all features -digitizing.confirme.erase=Are you sure you want to delete this feature? +digitizing.confirm.erase=Are you sure you want to delete this feature? digitizing.confirm.erase.all=Are you sure you want to delete all features? digitizing.toolbar.save=Save draw in the browser digitizing.toolbar.measure=Measures From 8ee506d28958f370e65f062e06def25cade05eb5 Mon Sep 17 00:00:00 2001 From: rldhont Date: Wed, 10 Jul 2024 15:19:34 +0200 Subject: [PATCH 4/5] JS Digitizing: Removed from localstorage when saved is toggled Now when the saved is toggle the browser localstorage is clear. When the user click on digitizing saved button, a message is displayed to explain that the drawing changes wil be saved in the browser, and the digitizing save title changed to explain that the drawing will be removed from the browser. --- assets/src/components/Digitizing.js | 18 +++++++++++++++++- assets/src/modules/Digitizing.js | 4 +++- .../locales/en_US/dictionnary.UTF-8.properties | 2 ++ lizmap/www/assets/css/map.css | 10 ++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/assets/src/components/Digitizing.js b/assets/src/components/Digitizing.js index 89c4e27eb3..b7d1ad4474 100644 --- a/assets/src/components/Digitizing.js +++ b/assets/src/components/Digitizing.js @@ -130,7 +130,7 @@ export default class Digitizing extends HTMLElement { -