mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Fix calculation of glance card size (#1930)
This commit is contained in:
parent
2e395c1b0d
commit
a081047008
@ -51,8 +51,11 @@ export class HuiGlanceCard extends hassLocalizeLitMixin(LitElement)
|
||||
}
|
||||
|
||||
public getCardSize() {
|
||||
const columns =
|
||||
this.config!.columns || Math.min(this.config!.entities.length, 5);
|
||||
return (
|
||||
(this.config!.title ? 1 : 0) + Math.ceil(this.configEntities!.length / 5)
|
||||
(this.config!.title ? 1 : 0) +
|
||||
2 * Math.ceil(this.configEntities!.length / columns)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user