mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.3.04a
This commit is contained in:
parent
c8f758ab3c
commit
d1c795494d
12 changed files with 215 additions and 117 deletions
|
|
@ -1,12 +1,12 @@
|
|||
"use strict";
|
||||
function editRegiment() {
|
||||
function editRegiment(selector) {
|
||||
if (customization) return;
|
||||
closeDialogs(".stable");
|
||||
// if (!layerIsOn("toggleArmies")) toggleArmies();
|
||||
if (!layerIsOn("toggleMilitary")) toggleMilitary();
|
||||
|
||||
armies.selectAll(":scope > g").classed("draggable", true);
|
||||
armies.selectAll(":scope > g > g").call(d3.drag().on("drag", dragRegiment));
|
||||
elSelected = d3.event.target.parentElement; // select g element
|
||||
elSelected = selector ? document.querySelector(selector) : d3.event.target.parentElement; // select g element
|
||||
if (!pack.states[elSelected.dataset.state]) return;
|
||||
if (!regiment()) return;
|
||||
updateRegimentData(regiment());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue