File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
services/static-webserver/client/source/class/osparc/info Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,12 @@ qx.Class.define("osparc.info.ServiceLarge", {
391391 } ,
392392
393393 __createThumbnail : function ( maxWidth , maxHeight = 160 ) {
394+ // make sure maxs are not larger than the mins
395+ const minWidth = Math . max ( 120 , maxWidth ) ;
396+ const minHeight = Math . max ( 139 , maxHeight ) ;
397+ maxWidth = Math . max ( minWidth , maxWidth ) ;
398+ maxHeight = Math . max ( minHeight , maxHeight ) ;
399+
394400 const serviceData = this . getService ( ) ;
395401 const thumbnail = osparc . info . Utils . createThumbnail ( maxWidth , maxHeight ) ;
396402 if ( serviceData [ "thumbnail" ] ) {
@@ -403,8 +409,8 @@ qx.Class.define("osparc.info.ServiceLarge", {
403409 source : noThumbnail
404410 } ) ;
405411 thumbnail . getChildControl ( "image" ) . set ( {
406- minWidth : Math . max ( 120 , maxWidth ) ,
407- minHeight : Math . max ( 139 , maxHeight )
412+ minWidth,
413+ minHeight,
408414 } ) ;
409415 }
410416 return thumbnail ;
You can’t perform that action at this time.
0 commit comments