summaryrefslogtreecommitdiff
path: root/scripts/cards/deck.js
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-07-20 10:58:42 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-07-20 10:58:42 -0400
commit68db9abc7a02c78a0f170003c32d1fcd796eb212 (patch)
tree602e9be8f4641991a9666315426a8ca10807c78c /scripts/cards/deck.js
parent5207f04d5b775bf4805d83c81aaad1cfcf3fe68a (diff)
Replace var with let + visual tweaks
- Replace var with let in most of my code - No longer bring cards to forfront of deck when hovering - Tweaks for dropdown selector input
Diffstat (limited to 'scripts/cards/deck.js')
-rw-r--r--scripts/cards/deck.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/cards/deck.js b/scripts/cards/deck.js
index 8d38186..8c8e3a7 100644
--- a/scripts/cards/deck.js
+++ b/scripts/cards/deck.js
@@ -117,7 +117,7 @@ class Deck {
if(index1 < 0 || index1 >= this.cards.length || index2 < 0 || index2 >= this.cards.length)
return
- var temp = this.cards[index1]
+ let temp = this.cards[index1]
this.cards[index1] = this.cards[index2];
this.cards[index2] = temp;
@@ -168,7 +168,7 @@ class Deck {
isInside(x, y)
{
- var rect = this.e.getBoundingClientRect();
+ let rect = this.e.getBoundingClientRect();
return (x > rect.left && x < rect.right && y > rect.top && y < rect.bottom)
}