Skip to content

Commit d75d467

Browse files
committed
1 parent bfb72cd commit d75d467

File tree

1 file changed

+6
-0
lines changed
  • services/web/client/source/class/osparc/component/widget

1 file changed

+6
-0
lines changed

services/web/client/source/class/osparc/component/widget/Thumbnail.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ qx.Class.define("osparc.component.widget.Thumbnail", {
110110
const srcHeight = qx.io.ImageLoader.getHeight(source);
111111
if (srcWidth && srcHeight) {
112112
const aspectRatio = srcWidth/srcHeight;
113+
if (this.getBounds() && this.getBounds().width < image.getMaxWidth()) {
114+
image.setMaxWidth(this.getBounds().width);
115+
}
116+
if (this.getBounds() && this.getBounds().height < image.getMaxHeight()) {
117+
image.setMaxHeight(this.getBounds().height);
118+
}
113119
const maxWidth = image.getMaxWidth();
114120
const maxHeight = image.getMaxHeight();
115121

0 commit comments

Comments
 (0)