From 209eb3c7c20441f0dbf48fc088a3396d624df467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonia=20P=C3=A9rez-Cerezo?= Date: Mon, 10 Mar 2025 22:00:06 +0100 Subject: [PATCH] Request read/write persmissions, don't place markers outside of edit mode --- frontend/common/map.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/common/map.js b/frontend/common/map.js index 1de05f1..771c311 100644 --- a/frontend/common/map.js +++ b/frontend/common/map.js @@ -117,9 +117,9 @@ async function updateBrouter () { } map.on('click', function(e) { - // if (!editMode) { - // return; - // } + if (!editMode) { + return; + } marker = new L.marker(e.latlng, {draggable: true}) ; markers.push(marker); marker.on("click", function(e) { @@ -139,7 +139,7 @@ async function pickDirectory(e){ e.stopPropagation() L.DomEvent.preventDefault(e); if (!editMode) { - dirHandle = await window.showDirectoryPicker(); + dirHandle = await window.showDirectoryPicker({ mode: 'readwrite' }); for (i = 0; i < l.length ; i++ ) { console.log(l[i].dirname); if (l[i].dirname === dirHandle.name) {