-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dwain
committed
Apr 7, 2020
1 parent
ce51149
commit 61250ec
Showing
7 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,13 @@ import { | |
css | ||
} from "https://unpkg.com/[email protected]/lit-element.js?module"; | ||
|
||
const VERSION = '0.1.0'; | ||
const VERSION = '0.1.2'; | ||
|
||
class DwainsFlexboxCard extends LitElement { | ||
constructor() { | ||
super(); | ||
} | ||
|
||
static get properties() { | ||
return { | ||
_config: {}, | ||
|
@@ -38,12 +42,14 @@ class DwainsFlexboxCard extends LitElement { | |
const promises = config.entities.map(config => this.createCardElement(config)); | ||
Promise.all(promises).then((cards) => { | ||
this._refCards = cards; | ||
this.requestUpdate(); | ||
//Removed some code here | ||
}) | ||
} else { | ||
const promises = config.cards.map(config => this.createCardElement(config)); | ||
Promise.all(promises).then((cards) => { | ||
this._refCards = cards; | ||
this.requestUpdate(); | ||
//Removed some code here | ||
}) | ||
} | ||
|
@@ -84,6 +90,8 @@ class DwainsFlexboxCard extends LitElement { | |
} | ||
|
||
const element = createThing(tag, cardConfig); | ||
|
||
//console.log(element); | ||
|
||
if(cardConfig.item_classes){ | ||
//console.log(cardConfig.grid); | ||
|
@@ -123,6 +131,9 @@ class DwainsFlexboxCard extends LitElement { | |
if (!this._config || !this._hass || !this._refCards) { | ||
return html``; | ||
} | ||
|
||
//console.log(this._refCards); | ||
|
||
var padding; | ||
if(this._config.padding){ | ||
padding = 'padding'; | ||
|