comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java @ 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 93302bd16f42
children 7d69e570e79b
comparison
equal deleted inserted replaced
2900:7715324132bf 2901:2fdeb239bbd2
240 } 240 }
241 art.getFilter().setCurrentKm(km); 241 art.getFilter().setCurrentKm(km);
242 if (chartContainer.hasMember(chartImg)) { 242 if (chartContainer.hasMember(chartImg)) {
243 chartContainer.removeMember(chartImg); 243 chartContainer.removeMember(chartImg);
244 } 244 }
245
246 int hWidth = helperContainer.getWidth() - 12;
247 int hHeight = helperContainer.getHeight() - 62;
248
249 if ((int)(hHeight *4/3) < hWidth) {
250 hWidth = (int)hHeight * 4/3;
251 }
252 else {
253 hHeight = (int)hWidth *3/4;
254 }
255
245 String imgUrl = GWT.getModuleBaseURL(); 256 String imgUrl = GWT.getModuleBaseURL();
246 imgUrl += "fixings-km-chart"; 257 imgUrl += "fixings-km-chart";
247 imgUrl += "?locale=" + locale; 258 imgUrl += "?locale=" + locale;
248 imgUrl += "&filter=" + art.getFilter().getChartFilter(helperContainer.getWidth() - 12, (int)(helperContainer.getWidth()*3/4) - 12); 259 imgUrl += "&filter=" + art.getFilter().getChartFilter(hWidth, hHeight);
249 260
250 chartImg = new Img(imgUrl, helperContainer.getWidth() - 12, (int)(helperContainer.getWidth()*3/4) - 12); 261 chartImg = new Img(imgUrl, hWidth, hHeight);
251 chartContainer.addMember(chartImg); 262 chartContainer.addMember(chartImg);
252 263
253 } 264 }
254 265
255 266

http://dive4elements.wald.intevation.org