From 8ca453cb87db88d32e34658442ecaceec1679313 Mon Sep 17 00:00:00 2001 From: Johannes Baumeister Date: Mon, 20 Apr 2026 11:49:14 +0200 Subject: [PATCH] Fix critical syntax error in vertex insertion handler --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index 519804d..910f8ee 100644 --- a/index.html +++ b/index.html @@ -1737,6 +1737,14 @@ labelLayers[v.id].addTo(map); } + // Allow vertex insertion by clicking anywhere on the polyline + routeLayers[v.id].on('click', (e) => { + if (!v.active) return; + if (!map.editTools) return; + + L.DomEvent.stopPropagation(e); + + const layer = routeLayers[v.id]; const point = e.latlng; const latlngs = layer.getLatLngs();