Skip to content

Commit

Permalink
fix some sizing issues: width/height wont scale down an image using n…
Browse files Browse the repository at this point in the history
…ow max-width/height instead
  • Loading branch information
ralfbecker committed Sep 19, 2024
1 parent 5496ce9 commit 6dbe754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/js/etemplate/Et2Image/Et2Image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>`;
Expand Down

0 comments on commit 6dbe754

Please sign in to comment.