mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-21 19:41:23 +01:00
fixed code as Azgaar suggested
+ Corrected provincesHeader distance in em. + const stateId = pack.provinces[p].state; - Deleted cell count.
This commit is contained in:
parent
f31022bad1
commit
18cbe2979e
2 changed files with 3 additions and 4 deletions
|
|
@ -4450,7 +4450,7 @@
|
|||
</div>
|
||||
|
||||
<div id="provincesEditor" class="dialog stable" style="display: none">
|
||||
<div id="provincesHeader" class="header" style="grid-template-columns: 11em 8em 8em 6em 6em 7em 8em">
|
||||
<div id="provincesHeader" class="header" style="grid-template-columns: 11em 8em 8em 6em 6em 6em 8em">
|
||||
<div data-tip="Click to sort by province name" class="sortable alphabetically" data-sortby="name">
|
||||
Province
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ function editProvinces() {
|
|||
cl = el.classList,
|
||||
line = el.parentNode,
|
||||
p = +line.dataset.id;
|
||||
const stateId = +document.getElementById("provincesFilterState").value;
|
||||
const stateId = pack.provinces[p].state;
|
||||
|
||||
if (el.tagName === "FILL-BOX") changeFill(el);
|
||||
else if (cl.contains("name")) editProvinceName(p);
|
||||
else if (cl.contains("coaIcon")) editEmblem("province", "provinceCOA" + p, pack.provinces[p]);
|
||||
else if (cl.contains("icon-star-empty")) capitalZoomIn(p);
|
||||
else if (cl.contains("icon-flag-empty")) triggerIndependencePromps(p);
|
||||
else if (cl.contains("icon-dot-circled")) overviewBurgs({stateId}); // {stateId}, filtered view for that state
|
||||
else if (cl.contains("icon-dot-circled")) overviewBurgs({stateId});
|
||||
else if (cl.contains("culturePopulation")) changePopulation(p);
|
||||
else if (cl.contains("icon-pin")) toggleFog(p, cl);
|
||||
else if (cl.contains("icon-trash-empty")) removeProvince(p);
|
||||
|
|
@ -187,7 +187,6 @@ function editProvinces() {
|
|||
|
||||
// update footer
|
||||
provincesFooterNumber.innerHTML = filtered.length;
|
||||
byId("provincesFooterCells").innerHTML = pack.cells.h.filter(h => h >= 20).length;
|
||||
byId("provincesFooterBurgs").innerHTML = totalBurgs;
|
||||
provincesFooterArea.innerHTML = filtered.length ? si(totalArea / filtered.length) + unit : 0 + unit;
|
||||
provincesFooterPopulation.innerHTML = filtered.length ? si(totalPopulation / filtered.length) : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue