mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.5.82 - bug fixes
This commit is contained in:
parent
2f70df6c59
commit
4fdb265b56
7 changed files with 26 additions and 606 deletions
|
|
@ -414,9 +414,16 @@ function togglePopulation(event) {
|
|||
} else {
|
||||
if (event && isCtrlClick(event)) {editStyle("population"); return;}
|
||||
turnButtonOff("togglePopulation");
|
||||
const hide = d3.transition().duration(1000).ease(d3.easeSinIn);
|
||||
population.select("#rural").selectAll("line").transition(hide).attr("y2", d => d[1]).remove();
|
||||
population.select("#urban").selectAll("line").transition(hide).delay(1000).attr("y2", d => d[1]).remove();
|
||||
const isD3data = population.select("line").datum();
|
||||
if (!isD3data) {
|
||||
// just remove
|
||||
population.selectAll("line").remove();
|
||||
} else {
|
||||
// remove with animation
|
||||
const hide = d3.transition().duration(1000).ease(d3.easeSinIn);
|
||||
population.select("#rural").selectAll("line").transition(hide).attr("y2", d => d[1]).remove();
|
||||
population.select("#urban").selectAll("line").transition(hide).delay(1000).attr("y2", d => d[1]).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue