mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
fix font size change buttons
This commit is contained in:
parent
1f10a8e281
commit
2dd8628f2b
2 changed files with 6 additions and 6 deletions
|
|
@ -568,13 +568,13 @@ styleFontSize.addEventListener("change", function () {
|
|||
});
|
||||
|
||||
styleFontPlus.addEventListener("click", function () {
|
||||
const size = Math.max(rn(getEl().attr("data-size") * 1.1, 2), 1);
|
||||
changeFontSize(size);
|
||||
const size = +getEl().attr("data-size") + 1;
|
||||
changeFontSize(Math.min(size, 999));
|
||||
});
|
||||
|
||||
styleFontMinus.addEventListener("click", function () {
|
||||
const size = Math.max(rn(getEl().attr("data-size") * 0.9, 2), 1);
|
||||
changeFontSize(size);
|
||||
const size = +getEl().attr("data-size") - 1;
|
||||
changeFontSize(Math.max(size, 1));
|
||||
});
|
||||
|
||||
function changeFontSize(size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue