fix some sizing issues: width/height wont scale down an image using now max-width/height instead

This commit is contained in:
ralf 2024-09-19 14:57:08 +02:00
parent 5496ce92cb
commit 6dbe75400e

View File

@ -178,7 +178,7 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
<img ${this.id ? html`id="${this.id}"` : ''}
src="${url}"
alt="${this.label || this.statustext}"
style="${this.height ? 'height: 100%; width: auto' : 'width: 100%; height: auto'}"
style="${this.height ? 'max-height: 100%; width: auto' : 'max-width: 100%; height: auto'}"
part="image"
loading="lazy"
>`;