mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
refactor: drawMilitary
This commit is contained in:
parent
e58cda2a5d
commit
0ea7e3a86d
12 changed files with 167 additions and 166 deletions
|
|
@ -185,6 +185,7 @@ function restoreLayers() {
|
|||
if (layerIsOn("toggleBorders")) drawBorders();
|
||||
if (layerIsOn("toggleStates")) drawStates();
|
||||
if (layerIsOn("toggleRivers")) drawRivers();
|
||||
if (layerIsOn("toggleMilitary")) drawMilitary();
|
||||
}
|
||||
|
||||
function toggleHeight(event) {
|
||||
|
|
@ -824,11 +825,11 @@ function drawRoutes() {
|
|||
function toggleMilitary(event) {
|
||||
if (!layerIsOn("toggleMilitary")) {
|
||||
turnButtonOn("toggleMilitary");
|
||||
$("#armies").fadeIn();
|
||||
drawMilitary();
|
||||
if (event && isCtrlClick(event)) editStyle("armies");
|
||||
} else {
|
||||
if (event && isCtrlClick(event)) return editStyle("armies");
|
||||
$("#armies").fadeOut();
|
||||
armies.selectAll("g").remove();
|
||||
turnButtonOff("toggleMilitary");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue