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
+7 -1
View File
@@ -7,7 +7,7 @@ import {
TemplateResult,
unsafeCSS,
} from 'lit';
import { customElement, state } from 'lit/decorators.js';
import { customElement, property, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { createRef, ref, Ref } from 'lit/directives/ref.js';
import { StyleInfo, styleMap } from 'lit/directives/style-map.js';
@@ -75,6 +75,7 @@ import {
getEntityTitle,
getHassDifferences,
homeAssistantSignPath,
isCardInPanel,
isHassDifferent,
isTriggeredState,
sideLoadHomeAssistantElements,
@@ -168,6 +169,10 @@ export class FrigateCard extends LitElement {
@state()
protected _view?: View;
// Whether or not the card is in panel mode on the dashboard.
@property({ attribute: 'panel', type: Boolean, reflect: true })
protected _panel = false;
protected _conditionState?: ConditionState;
protected _refMenu: Ref<FrigateCardMenu> = createRef();
@@ -1804,6 +1809,7 @@ export class FrigateCard extends LitElement {
screenfull.on('change', this._fullscreenHandler.bind(this));
}
this.addEventListener('mousemove', this._boundMouseHandler);
this._panel = isCardInPanel(this);
}
/**