Skip to content

Commit

Permalink
0.0.4b
Browse files Browse the repository at this point in the history
fix for 'inside' option
  • Loading branch information
Gluwc committed Jan 23, 2019
1 parent 8a83932 commit 53a81db
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bar-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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%;
Expand Down

0 comments on commit 53a81db

Please sign in to comment.