Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cesardlinx committed Oct 2, 2023
1 parent ea290bb commit 587a237
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/ui/hotkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@ export function getHotKeys(hk) {
},
onkeyup() {
hk.pressControlKeyUp();
}
},
},
ControlRight: {
onkeydown() {
hk.pressControlKeyDown();
},
onkeyup() {
hk.pressControlKeyUp();
}
},
},
Space: {
onkeydown() {
Expand Down
6 changes: 5 additions & 1 deletion src/ui/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as $j from 'jquery';
import * as time from '../utility/time';
import * as emoji from 'node-emoji';
import { Hotkeys, getHotKeys } from './hotkeys';
import { adjustBrand } from '../script';

import { Button, ButtonStateEnum } from './button';
import { Chat } from './chat';
Expand Down Expand Up @@ -35,7 +36,7 @@ export class UI {
* $activebox : Current active creature panel (left panel) container
* $dash : Overview container
* $grid : Creature grid container
* $brandlogo: Brand logo container
* $brandlogo: Brand logo container
*
* selectedCreature : String : ID of the visible creature card
* selectedPlayer : Integer : ID of the selected player in the dash
Expand Down Expand Up @@ -524,6 +525,9 @@ export class UI {
e.preventDefault();
});

// adjust brand logo on window resize
$j(window).on('resize', (ev) => adjustBrand());

this.$dash.find('.section.numbers .stat').on('mouseover', (event) => {
const $section = $j(event.target).closest('.section');
const which = $section.hasClass('stats') ? '.stats_desc' : '.masteries_desc';
Expand Down
10 changes: 6 additions & 4 deletions src/utility/hex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,15 @@ export class Hex {
if (this.overlayClasses.match(/reachable/)) {
targetAlpha = true;
this.overlay.loadTexture('hex_path');
// hover when creature is inactive
} else if (this.overlayClasses.match(/hover/)
&& this.displayClasses.indexOf(`creature player${player}`) === -1) {
// hover when creature is inactive
} else if (
this.overlayClasses.match(/hover/) &&
this.displayClasses.indexOf(`creature player${player}`) === -1
) {
this.display.loadTexture('hex_path');
this.display.alpha = 1;
this.overlay.loadTexture(`hex_hover_p${player}`);
// hover over active player
// hover over active player
} else if (this.overlayClasses.match(/hover/)) {
this.display.loadTexture('hex_path');
} else {
Expand Down

0 comments on commit 587a237

Please sign in to comment.