diff options
Diffstat (limited to 'scripts/cards')
-rw-r--r-- | scripts/cards/deck.js | 4 | ||||
-rw-r--r-- | scripts/cards/drag.js | 6 |
2 files changed, 5 insertions, 5 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) } diff --git a/scripts/cards/drag.js b/scripts/cards/drag.js index b24ccb1..fa1ef65 100644 --- a/scripts/cards/drag.js +++ b/scripts/cards/drag.js @@ -58,7 +58,7 @@ class MultiDrag extends EventTarget { if(e.button != 0) return; - var cap = new Event("dragstart"); + let cap = new Event("dragstart"); cap.drag = this.addDragEl( e.target, @@ -81,7 +81,7 @@ class MultiDrag extends EventTarget { if (i < 0 || i >= this.drag.length) return; - var cap = new Event("dragstop"); + let cap = new Event("dragstop"); cap.x = this.mouse[0]; cap.y = this.mouse[1]; @@ -112,7 +112,7 @@ class MultiDrag extends EventTarget { this.del = true; - var cap = new Event("dragstop"); + let cap = new Event("dragstop"); cap.x = this.mouse[0]; cap.y = this.mouse[1]; |