@@ -24,6 +24,13 @@ import {
2424 css ,
2525 svg
2626 } from "https://unpkg.com/[email protected] /lit-element.js?module" ; 27+
28+ console . info (
29+ `%c FLEX-HORSESHOE-CARD \n%c Version 1.1 ` ,
30+ 'color: yellow; font-weight: bold; background: black' ,
31+ 'color: white; font-weight: bold; background: dimgray' ,
32+ ) ;
33+
2734 //++ Consts ++++++++++
2835 const FONT_SIZE = 12 ;
2936 const SVG_VIEW_BOX = 200 ;
@@ -842,8 +849,9 @@ import {
842849 } ) ;
843850 } ) ;
844851
845- // For now, always force update to render the card if any of the states or attributes have changed...
846- if ( entityHasChanged ) { this . requestUpdate ( ) ; }
852+ // For now, always force update to render the card if any of the states or attributes have changed...
853+ // if (entityHasChanged) { this.requestUpdate();}
854+ this . requestUpdate ( ) ;
847855 }
848856
849857 /*******************************************************************************
@@ -855,7 +863,7 @@ import {
855863 */
856864
857865 setConfig ( config ) {
858- config = JSON . parse ( JSON . stringify ( config ) )
866+ config = JSON . parse ( JSON . stringify ( config ) ) ;
859867
860868 if ( ! config . entities ) {
861869 throw Error ( 'No entities defined' ) ;
@@ -892,7 +900,7 @@ import {
892900 show : { ...DEFAULT_SHOW , ...config . show } ,
893901 horseshoe_scale : { ...DEFAULT_HORSESHOE_SCALE , ...config . horseshoe_scale } ,
894902 horseshoe_state : { ...DEFAULT_HORSESHOE_STATE , ...config . horseshoe_state } ,
895- }
903+ } ;
896904
897905 for ( var entityValue of newConfig . entities ) {
898906 if ( ! entityValue . tap_action ) {
@@ -1060,7 +1068,7 @@ import {
10601068 _renderSvg ( ) {
10611069 // For some reason, using a var/const for the viewboxsize doesn't work.
10621070 // Even if the Chrome inspector shows 200 200. So hardcode for now!
1063- const { viewBoxSize, } = this ;
1071+ // const { viewBoxSize, } = this;
10641072
10651073 const cardFilter = this . config . card_filter ? this . config . card_filter : 'card--filter-none' ;
10661074
@@ -1290,7 +1298,7 @@ import {
12901298 var fsuomStr = configStyle [ "font-size" ] ;
12911299
12921300 var fsuomValue = 0.5 ;
1293- var fsuomType = 'em;'
1301+ var fsuomType = 'em;' ;
12941302 const fsuomSplit = fsuomStr . match ( / \D + | \d * \. ? \d + / g) ;
12951303 if ( fsuomSplit . length == 2 ) {
12961304 fsuomValue = Number ( fsuomSplit [ 0 ] ) * .6 ;
0 commit comments