mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
fix: routes id after removing all
This commit is contained in:
parent
106d5edc78
commit
9c97711a99
6 changed files with 15 additions and 10 deletions
|
|
@ -58,7 +58,7 @@ function overviewRoutes() {
|
|||
|
||||
// update footer
|
||||
routesFooterNumber.innerHTML = pack.routes.length;
|
||||
const averageLength = rn(d3.mean(pack.routes.map(r => r.length)));
|
||||
const averageLength = rn(d3.mean(pack.routes.map(r => r.length)) || 0);
|
||||
routesFooterLength.innerHTML = averageLength * distanceScale + " " + distanceUnitInput.value;
|
||||
|
||||
// add listeners
|
||||
|
|
@ -175,8 +175,8 @@ function overviewRoutes() {
|
|||
pack.routes = [];
|
||||
routes.selectAll("path").remove();
|
||||
|
||||
routesOverviewAddLines();
|
||||
$(this).dialog("close");
|
||||
$("#routesOverview").dialog("close");
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue