From 85e6c257068b6b1c2452e57dcc8c4ca9660e7cb7 Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Mon, 8 Nov 2010 12:33:03 +0000 Subject: [PATCH] LMS-1817 dynamix: maintain images aspect ratio SVN: 18580 --- .../web/client/application/detailviewers/ImageUrlUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java index 54231124c1d..3624e6a9ef6 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java @@ -74,7 +74,8 @@ public class ImageUrlUtils methodWithParameters.addParameter("mode", "thumbnail" + width + "x" + height); String imageURL = methodWithParameters.toString(); - return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, width, height); + // do not specify width to get correct aspect ratio of the original image + return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, -1, height); } /** creates a widget which displays the specified URL and adds it to the container */ @@ -106,7 +107,8 @@ public class ImageUrlUtils methodWithParameters.addParameter("mode", "thumbnail" + width + "x" + height); String imageURL = methodWithParameters.toString(); - return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, width, height); + // do not specify width to get correct aspect ratio of the original image + return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, -1, height); } private static URLMethodWithParameters createBasicImageURL(String sessionID, WellImages images, -- GitLab