mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 18:41:23 +01:00
feat: zones - editot changes
This commit is contained in:
parent
a63a60c0ea
commit
26c608402c
2 changed files with 10 additions and 9 deletions
|
|
@ -1884,9 +1884,8 @@ function toggleZones(event) {
|
|||
function drawZones() {
|
||||
const filterBy = byId("zonesFilterType").value;
|
||||
const isFiltered = filterBy && filterBy !== "all";
|
||||
|
||||
const visibleZones = pack.zones.filter(
|
||||
zone => !zone.hidden && zone.cells.length && (!isFiltered || zone.type === filterBy)
|
||||
({hidden, cells, type}) => !hidden && cells.length && (!isFiltered || type === filterBy)
|
||||
);
|
||||
zones.html(visibleZones.map(drawZone).join(""));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue