mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
option to not rescale labels on zoom
This commit is contained in:
parent
3fb68a89f6
commit
37e5b803bc
4 changed files with 11 additions and 2 deletions
3
main.js
3
main.js
|
|
@ -479,7 +479,8 @@ function invokeActiveZooming() {
|
|||
if (this.id === "burgLabels") return;
|
||||
const desired = +this.dataset.size;
|
||||
const relative = Math.max(rn((desired + desired / scale) / 2, 2), 1);
|
||||
this.setAttribute("font-size", relative);
|
||||
if (rescaleLabels.checked) this.setAttribute("font-size", relative);
|
||||
|
||||
const hidden = hideLabels.checked && (relative * scale < 6 || relative * scale > 60);
|
||||
if (hidden) this.classList.add("hidden");
|
||||
else this.classList.remove("hidden");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue