v1.5.05 - optimization, partial d3 removal

This commit is contained in:
Azgaar 2021-02-02 13:13:32 +03:00
parent a8cf4c04d4
commit 24d2efe8b6
11 changed files with 86 additions and 67 deletions

View file

@ -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) {