# HG changeset patch # User Raimund Renkert # Date 1339669810 0 # Node ID 2fdeb239bbd256122200303ab5b60723f1f56ca9 # Parent 7715324132bf3abef9296c88e5c2e09d5e84908f Changed helper chart size in Fix analysis to avoid overlapping in maximized project window. flys-client/trunk@4659 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 7715324132bf -r 2fdeb239bbd2 flys-client/ChangeLog --- 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 + + * 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 * main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl: diff -r 7715324132bf -r 2fdeb239bbd2 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java --- 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); }