Skip to content

Commit

Permalink
fixed shadeInner
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocka84 committed Aug 10, 2018
1 parent 96cbc26 commit 2302c12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
14 changes: 7 additions & 7 deletions dual-gauge-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class DualGaugeCard extends HTMLElement {
this.config.max = 100;
}

if (!this.config.hasOwnProperty('shadeInner')) {
this.config.shadeInner = true
}
if (this.config.colors) {
this.config.shadeInner = true; //config.shadeInner !== false;
this.config.inner.colors = this.config.outer.colors = this.config.colors;
} else {
this.config.shadeInner = false; //config.shadeInner === true;
}

if (this.config.inner.colors) {
Expand Down Expand Up @@ -60,10 +60,6 @@ class DualGaugeCard extends HTMLElement {
}
}

_showOuterDetails() {
this._showDetails('outer');
}

_showDetails(gauge) {
const event = new Event('hass-more-info', {
bubbles: true,
Expand Down Expand Up @@ -187,6 +183,10 @@ class DualGaugeCard extends HTMLElement {
this.nodes.content.classList.add('shadeInner');
}

if (this.config.card_width) {
this.nodes.content.style.setProperty('--gauge-card-width', this.config.card_width + 'px');
}

this._initStyles();
}

Expand Down

0 comments on commit 2302c12

Please sign in to comment.