mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
v 0.8.24b
This commit is contained in:
parent
8b6aa11b59
commit
2d5d008fe8
3 changed files with 7 additions and 3 deletions
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
const getSearoutes = function() {
|
||||
console.time("generateSearoutes");
|
||||
const cells = pack.cells, allPorts = pack.burgs.filter(b => b.port != 0 && !b.removed);
|
||||
const cells = pack.cells, allPorts = pack.burgs.filter(b => b.port > 0 && !b.removed);
|
||||
if (allPorts.length < 2) return [];
|
||||
const bodies = new Set(allPorts.map(b => b.port)); // features with ports
|
||||
let from = [], exit = null, path = [], paths = []; // array to store path segments
|
||||
|
|
|
|||
|
|
@ -361,13 +361,17 @@ function parseLoadedData(data) {
|
|||
if (borders.style("display") !== "none" && borders.selectAll("*").size()) turnButtonOn("toggleBorders"); else turnButtonOff("toggleBorders");
|
||||
if (routes.style("display") !== "none" && routes.selectAll("path").size()) turnButtonOn("toggleRoutes"); else turnButtonOff("toggleRoutes");
|
||||
if (temperature.selectAll("*").size()) turnButtonOn("toggleTemp"); else turnButtonOff("toggleTemp");
|
||||
if (population.select("#rural").selectAll("*").size()) turnButtonOn("togglePopulation"); else turnButtonOff("togglePopulation");
|
||||
if (prec.selectAll("circle").size()) turnButtonOn("togglePrec"); else turnButtonOff("togglePrec");
|
||||
if (labels.style("display") !== "none") turnButtonOn("toggleLabels"); else turnButtonOff("toggleLabels");
|
||||
if (icons.style("display") !== "none") turnButtonOn("toggleIcons"); else turnButtonOff("toggleIcons");
|
||||
if (markers.style("display") !== "none") turnButtonOn("toggleMarkers"); else turnButtonOff("toggleMarkers");
|
||||
if (ruler.style("display") !== "none") turnButtonOn("toggleRulers"); else turnButtonOff("toggleRulers");
|
||||
if (scaleBar.style("display") !== "none") turnButtonOn("toggleScaleBar"); else turnButtonOff("toggleScaleBar");
|
||||
|
||||
// special case for population bars
|
||||
const populationIsOn = population.selectAll("line").size();
|
||||
if (populationIsOn) drawPopulation();
|
||||
if (populationIsOn) turnButtonOn("togglePopulation"); else turnButtonOff("togglePopulation");
|
||||
}()
|
||||
|
||||
void function restoreRulersEvents() {
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ function editBiomes() {
|
|||
const url = window.URL.createObjectURL(dataBlob);
|
||||
const link = document.createElement("a");
|
||||
document.body.appendChild(link);
|
||||
link.download = "states_data" + Date.now() + ".csv";
|
||||
link.download = "biomes_data" + Date.now() + ".csv";
|
||||
link.href = url;
|
||||
link.click();
|
||||
window.setTimeout(function() {window.URL.revokeObjectURL(url);}, 2000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue