summaryrefslogtreecommitdiff
path: root/scripts/cards
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cards')
-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)