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();