changeset 2901:2fdeb239bbd2

Changed helper chart size in Fix analysis to avoid overlapping in maximized project window. flys-client/trunk@4659 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 14 Jun 2012 10:30:10 +0000
parents 7715324132bf
children 82043c09a659
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java
diffstat 2 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Jun 14 10:01:16 2012 +0000
+++ b/flys-client/ChangeLog	Thu Jun 14 10:30:10 2012 +0000
@@ -1,3 +1,8 @@
+2012-06-14  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java:
+	  Changed helper chart size to avoid overlapping in maximized project window.
+
 2012-06-14  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java	Thu Jun 14 10:01:16 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java	Thu Jun 14 10:30:10 2012 +0000
@@ -242,12 +242,23 @@
         if (chartContainer.hasMember(chartImg)) {
             chartContainer.removeMember(chartImg);
         }
+
+        int hWidth = helperContainer.getWidth() - 12;
+        int hHeight = helperContainer.getHeight() - 62;
+
+        if ((int)(hHeight *4/3) < hWidth) {
+            hWidth = (int)hHeight * 4/3;
+        }
+        else {
+            hHeight = (int)hWidth *3/4;
+        }
+
         String imgUrl = GWT.getModuleBaseURL();
         imgUrl += "fixings-km-chart";
         imgUrl += "?locale=" + locale;
-        imgUrl += "&filter=" + art.getFilter().getChartFilter(helperContainer.getWidth() - 12, (int)(helperContainer.getWidth()*3/4) - 12);
+        imgUrl += "&filter=" + art.getFilter().getChartFilter(hWidth, hHeight);
 
-        chartImg = new Img(imgUrl, helperContainer.getWidth() - 12, (int)(helperContainer.getWidth()*3/4) - 12);
+        chartImg = new Img(imgUrl, hWidth, hHeight);
         chartContainer.addMember(chartImg);
 
     }

http://dive4elements.wald.intevation.org