From 6c2c5afc17ba807c4bcd601c4051ea66b823f5d2 Mon Sep 17 00:00:00 2001 From: DreadKnight Date: Wed, 25 Oct 2023 04:59:05 +0300 Subject: [PATCH] more linting --- src/ui/interface.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/ui/interface.js b/src/ui/interface.js index 9c77398ab..ef4e93d9a 100644 --- a/src/ui/interface.js +++ b/src/ui/interface.js @@ -378,7 +378,7 @@ export class UI { // Prevents default touch behaviour on slider when first touched (prevents scrolling the screen). slider.addEventListener('touchstart', (e) => e.preventDefault(), { passive: false }); - slider.addEventListener('touchmove', (e) =>{ + slider.addEventListener('touchmove', (e) => { // Get slider relative to the view port. const sliderRect = slider.getBoundingClientRect(); // The original touch point Y coordinate relative to the view port. @@ -394,13 +394,11 @@ export class UI { const slidersNewVal = scaledDist + parseFloat(slider.min); // Sets the slider value to the new value between the min/max bounds of the slider. slider.value = Math.min(Math.max(slidersNewVal, slider.min), slider.max); - + // Manually dispatches the input event to update the sound system with new slider value. slider.dispatchEvent(new Event('input')); }); - - this.hotkeys = new Hotkeys(this); const ingameHotkeys = getHotKeys(this.hotkeys); @@ -977,7 +975,7 @@ export class UI { if (activeCreature.player.getNbrOfCreatures() > game.creaLimitNbr) { $j('#materialize_button p').text(game.msg.ui.dash.materializeOverload); - } + } // Check if the player is viewing the wrong tab else if ( activeCreature.player.id !== player && @@ -989,7 +987,7 @@ export class UI { // Switch to turn player's dark priest this.materializeButton.click = () => { - this.showCreature("--", activeCreature.player.id); + this.showCreature('--', activeCreature.player.id); }; $j('#card .sideA').on('click', this.materializeButton.click); @@ -2454,4 +2452,4 @@ const utils = { }; }; }, -}; \ No newline at end of file +};