Add timed forced rebuilding. #17

This commit is contained in:
2019-03-20 10:02:37 +01:00
parent 226f86debe
commit d4acb7de58
2 changed files with 9 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ class LayoutCard extends cardTools.LitElement {
this.layout = config.layout || 'auto';
this.minCols = config.column_num || 1;
this.maxCols = config.max_columns || 100;
this.colWidth = config.column_width || 300;
this.colWidth = config.column_width || 400;
this.maxWidth = config.max_width || 500;
this.minHeight = config.min_height || 5;
this.rtl = config.rtl || false;
@@ -16,6 +16,8 @@ class LayoutCard extends cardTools.LitElement {
window.addEventListener('resize', () => this.build());
window.addEventListener('hass-open-menu', () => setTimeout(() => this.build(), 100));
window.addEventListener('hass-close-menu', () => setTimeout(() => this.build(), 100));
if(config.rebuild)
window.setTimeout(() => this.build(), config.rebuild);
}
render() {