mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
feat: edit routes - main
This commit is contained in:
parent
d6c01c8995
commit
68b4cfd370
9 changed files with 401 additions and 357 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue