From 53a81dbfe715e50fafe1909b9b9136fdd8844902 Mon Sep 17 00:00:00 2001 From: Gluwc Date: Wed, 23 Jan 2019 17:22:09 +0100 Subject: [PATCH] 0.0.4b fix for 'inside' option --- bar-card.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bar-card.js b/bar-card.js index d284cf6..944eb9e 100644 --- a/bar-card.js +++ b/bar-card.js @@ -50,11 +50,11 @@ class BarCard extends HTMLElement { // Config adjustments. if (config.from == "left") config.from = "right"; - else config.from = "left"; + else config.from = "right"; + + if(config.title_position == "inside"){ + config.width = "100%"; - let insideTitleBarPosition = ""; - if(config.title_position != "inside"){ - insideTitleBarPosition = "position: absolute"; } // Create card elements. @@ -103,7 +103,6 @@ class BarCard extends HTMLElement { text-shadow: 1px 1px #000; border-radius: 3px; width: ${config.width}; - ${insideTitleBarPosition}; `+barPosition+` --bar-direction: ${config.from}; --bar-percent: 50%;