mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix media control card background image (#18891)
This commit is contained in:
parent
dddba7af00
commit
ff8f0697c2
@ -101,6 +101,8 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
this._config = config;
|
||||
|
||||
this.updateComplete.then(() => this._measureCard());
|
||||
}
|
||||
|
||||
public connectedCallback(): void {
|
||||
@ -339,15 +341,12 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
||||
|
||||
protected firstUpdated(): void {
|
||||
this._attachObserver();
|
||||
this._measureCard();
|
||||
}
|
||||
|
||||
public willUpdate(changedProps: PropertyValues): void {
|
||||
super.willUpdate(changedProps);
|
||||
|
||||
if (!this.hasUpdated) {
|
||||
this._measureCard();
|
||||
}
|
||||
|
||||
if (
|
||||
!this._config ||
|
||||
!this.hass ||
|
||||
@ -468,6 +467,7 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
||||
|
||||
private _measureCard() {
|
||||
const card = this.shadowRoot!.querySelector("ha-card");
|
||||
|
||||
if (!card) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user