Expand the timeline to 100% height in panel mode.

This commit is contained in:
Dermot Duffy
2022-10-15 12:16:43 -07:00
parent 42a9c62f6b
commit 700f09c12c
5 changed files with 33 additions and 1 deletions
+12
View File
@@ -336,3 +336,15 @@ export const getEntitiesFromHASS = (hass: HomeAssistant, domain?: string): strin
entities.sort();
return entities;
};
/**
* Determine if a card is in panel mode.
*/
export const isCardInPanel = (card: HTMLElement): boolean => {
const parent = card.getRootNode();
return !!(
parent &&
parent instanceof ShadowRoot &&
parent.host.tagName === 'HUI-PANEL-VIEW'
);
};