mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
v1.5.05 - optimization, partial d3 removal
This commit is contained in:
parent
a8cf4c04d4
commit
24d2efe8b6
11 changed files with 86 additions and 67 deletions
|
|
@ -172,6 +172,13 @@ function removeBurg(id) {
|
|||
const cells = pack.cells, burg = pack.burgs[id];
|
||||
burg.removed = true;
|
||||
cells.burg[burg.cell] = 0;
|
||||
|
||||
if (burg.coa) {
|
||||
const coaId = "burgCOA" + id;
|
||||
if (document.getElementById(coaId)) document.getElementById(coaId).remove();
|
||||
emblems.select(`#burgEmblems > use[data-i='${id}']`).remove();
|
||||
delete burg.coa; // remove to save data
|
||||
}
|
||||
}
|
||||
|
||||
function toggleCapital(burg) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue