mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-21 19:41:23 +01:00
feat: routes overview - create route
This commit is contained in:
parent
834d6f6cc7
commit
ff27937cc4
2 changed files with 3 additions and 2 deletions
|
|
@ -17,7 +17,8 @@ function createRoute(defaultGroup) {
|
||||||
|
|
||||||
// update route groups
|
// update route groups
|
||||||
byId("routeCreatorGroupSelect").innerHTML = Array.from(routes.selectAll("g")._groups[0]).map(el => {
|
byId("routeCreatorGroupSelect").innerHTML = Array.from(routes.selectAll("g")._groups[0]).map(el => {
|
||||||
return `<option value="${el.id}" ${el.id === defaultGroup ? "selected" : ""}>${el.id}</option>`;
|
const selected = defaultGroup || "roads";
|
||||||
|
return `<option value="${el.id}" ${el.id === selected ? "selected" : ""}>${el.id}</option>`;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#routeCreator").dialog({
|
$("#routeCreator").dialog({
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function overviewRoutes() {
|
||||||
|
|
||||||
// add listeners
|
// add listeners
|
||||||
byId("routesOverviewRefresh").on("click", routesOverviewAddLines);
|
byId("routesOverviewRefresh").on("click", routesOverviewAddLines);
|
||||||
// byId("routeCreateNew").on("click", createRoute);
|
byId("routeCreateNew").on("click", createRoute);
|
||||||
byId("routesExport").on("click", downloadRoutesData);
|
byId("routesExport").on("click", downloadRoutesData);
|
||||||
byId("routesRemoveAll").on("click", triggerAllRoutesRemove);
|
byId("routesRemoveAll").on("click", triggerAllRoutesRemove);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue