feat: edit routes - main

This commit is contained in:
Azgaar 2024-05-04 12:04:45 +02:00
parent d6c01c8995
commit 68b4cfd370
9 changed files with 401 additions and 357 deletions

View file

@ -793,13 +793,9 @@ function addRouteOnClick() {
unpressClickToAddButton();
const [x, y] = d3.mouse(this);
const newRoute = routes
.select("g")
.append("path")
.attr("id", getNextId("route"))
.attr("data-new", 1)
.attr("d", `M${x},${y}`);
editRoute({node: newRoute.node(), mode: "onclick"});
const id = getNextId("route");
routes.select("g").append("path").attr("id", id).attr("data-new", 1).attr("d", `M${x},${y}`);
editRoute(id);
}
function toggleAddMarker() {