mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
v1.5.18 - emblems style settings
This commit is contained in:
parent
7b272839a1
commit
222baaf9bc
8 changed files with 102 additions and 29 deletions
4
main.js
4
main.js
|
|
@ -443,12 +443,12 @@ function invokeActiveZooming() {
|
|||
else this.classList.remove("hidden");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// rescale emblems on zoom
|
||||
if (emblems.style("display") !== "none") {
|
||||
emblems.selectAll("g").each(function() {
|
||||
const size = this.getAttribute("font-size") * scale;
|
||||
const hidden = size < 25 || size > 300;
|
||||
const hidden = hideEmblems.checked && (size < 25 || size > 300);
|
||||
if (hidden) this.classList.add("hidden"); else this.classList.remove("hidden");
|
||||
if (!hidden && COArenderer && this.children.length && !this.children[0].getAttribute("href")) renderGroupCOAs(this);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue