From 424124ab9a529829d943503396da46a33549a5cf Mon Sep 17 00:00:00 2001 From: scossa Date: Sun, 18 Aug 2024 20:40:43 +0200 Subject: [PATCH] =?UTF-8?q?form=20switchano=20a=20seconda=20della=20modali?= =?UTF-8?q?t=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/eventHandler.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/js/eventHandler.js b/public/js/eventHandler.js index aa3081e..ea364d1 100644 --- a/public/js/eventHandler.js +++ b/public/js/eventHandler.js @@ -18,8 +18,8 @@ export function initEvents(map){ event.stopPropagation(); //editMode = true; //tmpMarkerSet = false; - markerFormContainer.style.display = 'flex'; - noticeCoordsPicker.style.display = 'block'; + markerFormContainer.style.display = 'flex'; //tutto + noticeCoordsPicker.style.display = 'block'; //messaggio inseirmento // switch modalità inserimento/visualizzazione if (isRedIcon) { @@ -28,6 +28,9 @@ export function initEvents(map){ document.getElementById('map').style = 'cursor: auto;'; editMode = false; tmpMarkerSet = true; + noticeCoordsPicker.style.display = 'block'; //messaggio inseirmento + markerFormContainer.style.display = 'none'; //tutto + // implementare eliminazione (visiva) dell'eventuale marker temporaneo inserito } else { @@ -36,6 +39,8 @@ export function initEvents(map){ document.getElementById('map').style = 'cursor: url("https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png") 13 41, auto;'; editMode = true; tmpMarkerSet = false; + remainingForm.style.display = 'none'; + } // attiva/disattiva icona X @@ -62,6 +67,7 @@ export function initEvents(map){ } const marker = createMarker(tmpMarker, L, map) tmpMarkerSet = true + //document.getElementById("addMarkerBtn").innerHTML = 'Button Image'; // Va creata la logica di eliminazione del marker tmp //localStorage.setItem("tmpMarkerId", marker._leaflet_id); }