From 8798a7f1fbdbf13ca31d21c0242fbfa26bf36b6a Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sat, 13 Feb 2021 01:47:42 -0500 Subject: Assets and fixes + No, U assets + Working position css for decks --- scripts/cards/deck.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'scripts') 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) -- cgit v1.2.3