mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 10:01:23 +01:00
chore: modularize main.js
This commit is contained in:
parent
51df2f90b0
commit
e739698346
24 changed files with 1775 additions and 1706 deletions
|
|
@ -94,3 +94,18 @@ export function invokeActiveZooming() {
|
|||
ruler.selectAll("text").attr("font-size", size);
|
||||
}
|
||||
}
|
||||
|
||||
async function renderGroupCOAs(g) {
|
||||
const [group, type] =
|
||||
g.id === "burgEmblems"
|
||||
? [pack.burgs, "burg"]
|
||||
: g.id === "provinceEmblems"
|
||||
? [pack.provinces, "province"]
|
||||
: [pack.states, "state"];
|
||||
for (let use of g.children) {
|
||||
const i = +use.dataset.i;
|
||||
const id = type + "COA" + i;
|
||||
COArenderer.trigger(id, group[i].coa);
|
||||
use.setAttribute("href", "#" + id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue