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
|
|
@ -676,8 +676,8 @@
|
|||
<tr data-tip="Set font size">
|
||||
<td>Font size</td>
|
||||
<td>
|
||||
<button id="styleFontPlus" data-tip="Multiply font size by 1.1" class="whiteButton">+</button>
|
||||
<button id="styleFontMinus" data-tip="Multiply font size by 0.9" class="whiteButton" >-</button>
|
||||
<button id="styleFontPlus" data-tip="Increase font" class="whiteButton">+</button>
|
||||
<button id="styleFontMinus" data-tip="Descrease font" class="whiteButton" >-</button>
|
||||
<input id="styleFontSize" type="number" min=.5 max=100 step=.1 value=14>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -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