Expand the timeline to 100% height in panel mode.
This commit is contained in:
@@ -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'
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user