mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Attempt to fix picture-elements functionality broken in 2022.11 (#14813)
fixes undefined
This commit is contained in:
parent
5933c2eb8e
commit
9be6a47d88
@ -193,7 +193,7 @@ export class HuiImage extends LitElement {
|
|||||||
style=${styleMap({
|
style=${styleMap({
|
||||||
paddingBottom: useRatio
|
paddingBottom: useRatio
|
||||||
? `${((100 * this._ratio!.h) / this._ratio!.w).toFixed(2)}%`
|
? `${((100 * this._ratio!.h) / this._ratio!.w).toFixed(2)}%`
|
||||||
: !this._lastImageHeight
|
: this._lastImageHeight === undefined
|
||||||
? "56.25%"
|
? "56.25%"
|
||||||
: undefined,
|
: undefined,
|
||||||
backgroundImage:
|
backgroundImage:
|
||||||
@ -206,7 +206,7 @@ export class HuiImage extends LitElement {
|
|||||||
: undefined,
|
: undefined,
|
||||||
})}
|
})}
|
||||||
class="container ${classMap({
|
class="container ${classMap({
|
||||||
ratio: useRatio || !this._lastImageHeight,
|
ratio: useRatio || this._lastImageHeight === undefined,
|
||||||
})}"
|
})}"
|
||||||
>
|
>
|
||||||
${this.cameraImage && this.cameraView === "live"
|
${this.cameraImage && this.cameraView === "live"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user