@@ -24,6 +24,13 @@ import {
24
24
css ,
25
25
svg
26
26
} 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
+
27
34
//++ Consts ++++++++++
28
35
const FONT_SIZE = 12 ;
29
36
const SVG_VIEW_BOX = 200 ;
@@ -842,8 +849,9 @@ import {
842
849
} ) ;
843
850
} ) ;
844
851
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 ( ) ;
847
855
}
848
856
849
857
/*******************************************************************************
@@ -855,7 +863,7 @@ import {
855
863
*/
856
864
857
865
setConfig ( config ) {
858
- config = JSON . parse ( JSON . stringify ( config ) )
866
+ config = JSON . parse ( JSON . stringify ( config ) ) ;
859
867
860
868
if ( ! config . entities ) {
861
869
throw Error ( 'No entities defined' ) ;
@@ -892,7 +900,7 @@ import {
892
900
show : { ...DEFAULT_SHOW , ...config . show } ,
893
901
horseshoe_scale : { ...DEFAULT_HORSESHOE_SCALE , ...config . horseshoe_scale } ,
894
902
horseshoe_state : { ...DEFAULT_HORSESHOE_STATE , ...config . horseshoe_state } ,
895
- }
903
+ } ;
896
904
897
905
for ( var entityValue of newConfig . entities ) {
898
906
if ( ! entityValue . tap_action ) {
@@ -1060,7 +1068,7 @@ import {
1060
1068
_renderSvg ( ) {
1061
1069
// For some reason, using a var/const for the viewboxsize doesn't work.
1062
1070
// Even if the Chrome inspector shows 200 200. So hardcode for now!
1063
- const { viewBoxSize, } = this ;
1071
+ // const { viewBoxSize, } = this;
1064
1072
1065
1073
const cardFilter = this . config . card_filter ? this . config . card_filter : 'card--filter-none' ;
1066
1074
@@ -1290,7 +1298,7 @@ import {
1290
1298
var fsuomStr = configStyle [ "font-size" ] ;
1291
1299
1292
1300
var fsuomValue = 0.5 ;
1293
- var fsuomType = 'em;'
1301
+ var fsuomType = 'em;' ;
1294
1302
const fsuomSplit = fsuomStr . match ( / \D + | \d * \. ? \d + / g) ;
1295
1303
if ( fsuomSplit . length == 2 ) {
1296
1304
fsuomValue = Number ( fsuomSplit [ 0 ] ) * .6 ;
0 commit comments