summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2021-02-13 01:47:42 -0500
committerKyle Gunger <kgunger12@gmail.com>2021-02-13 01:47:42 -0500
commit8798a7f1fbdbf13ca31d21c0242fbfa26bf36b6a (patch)
treeea948eacf8675e5b3d6cd1681d313024d343c0d4 /scripts
parent5201f901dbe222e022d6986fa2299ba8ee2bd2da (diff)
Assets and fixes
+ No, U assets + Working position css for decks
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cards/deck.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/cards/deck.js b/scripts/cards/deck.js
index d87d619..dcfa1e9 100644
--- a/scripts/cards/deck.js
+++ b/scripts/cards/deck.js
@@ -45,14 +45,9 @@ class Deck {
// all - no effect
this.sct = options.sct > 0 ? options.sct : 0;
- // Position
- // array of where the deck is centered
- this.x = options.pos[0];
- this.y = options.pos[1];
-
this.e = document.createElement("deck");
- this.e.style.left = this.x + "px";
- this.e.style.top = this.y + "px";
+ this.e.style.setProperty("--x", options.pos[0]);
+ this.e.style.setProperty("--y", options.pos[1]);
this.e.setAttribute("mode", options.mode);
this.getID = function() {
@@ -73,7 +68,6 @@ class Deck {
this.cards.push(card);
this.e.appendChild(card.e);
this.updatePos();
-
}
prependCard(card)