fix: routes (v1.104.3)

This commit is contained in:
Azgaar 2024-09-20 14:16:07 +02:00
parent 3d1f268003
commit 5904e9e7c6
9 changed files with 98 additions and 65 deletions

View file

@ -174,9 +174,10 @@ function editRoute(id) {
function handleControlPointClick() {
const controlPoint = d3.select(this);
const point = controlPoint.datum();
const route = getRoute();
if (route.points.length < 3) return; // can't remove or split point if only 2 points in route
const index = route.points.indexOf(point);
const isSplitMode = byId("routeSplit").classList.contains("pressed");