summaryrefslogtreecommitdiff
path: root/scripts/cards
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-08-11 00:03:45 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-08-11 00:03:45 -0400
commitad911d6edd0fa76431284ef6283bb07da45d808d (patch)
tree77ea7c6f18b6b29a0e49b3050bfdc8ae41e6d2e6 /scripts/cards
parent32a50674868c48c34d35694009f3f1a59e3cf823 (diff)
A few small fixes
Diffstat (limited to 'scripts/cards')
-rw-r--r--scripts/cards/card.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/cards/card.js b/scripts/cards/card.js
index 7246db3..17d8994 100644
--- a/scripts/cards/card.js
+++ b/scripts/cards/card.js
@@ -81,6 +81,16 @@ class Card {
static generateObjectCard (data, el)
{
// Generate card areas.
+ if (typeof data.style == "object") {
+ for (let i in data.style) {
+ el.style.setProperty(i, data.style[i]);
+ }
+ }
+
+ if(data.assetURL == null) {
+ data.assetURL = "./";
+ }
+
for (let i of CardPos)
{
if (typeof data[i] == "object")