Mercurial > dive4elements > river
changeset 612:e59f2569558e
Zoom-to-max-extent will zoom to the initial chart range now (without zoom values given).
flys-client/trunk@2227 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 24 Jun 2011 09:53:25 +0000 |
parents | 854312c0528c |
children | 471ca61b83b5 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java |
diffstat | 2 files changed, 30 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Fri Jun 24 09:20:22 2011 +0000 +++ b/flys-client/ChangeLog Fri Jun 24 09:53:25 2011 +0000 @@ -1,3 +1,9 @@ +2011-06-24 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java: + The "zoom-to-max-extent" button will have the effect that no zoom values + are transfered to the server. + 2011-06-24 Ingo Weinzierl <ingo@intevation.de> flys/issue21 (Gleiches Projekt kann mehr als einmal gleichzeitig geƶffnet werden)
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java Fri Jun 24 09:20:22 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java Fri Jun 24 09:53:25 2011 +0000 @@ -506,10 +506,18 @@ double[] zoom = getZoomValues(); if (zoom != null) { - imgUrl += "&minx=" + Double.toString(zoom[0]); - imgUrl += "&maxx=" + Double.toString(zoom[1]); - imgUrl += "&miny=" + Double.toString(zoom[2]); - imgUrl += "&maxy=" + Double.toString(zoom[3]); + if (zoom[0] != 0 || zoom[1] != 1) { + // a zoom range of 0-1 means displaying the whole range. In such + // case we don't need to zoom. + imgUrl += "&minx=" + Double.toString(zoom[0]); + imgUrl += "&maxx=" + Double.toString(zoom[1]); + } + if (zoom[2] != 0 || zoom[3] != 1) { + // a zoom range of 0-1 means displaying the whole range. In such + // case we don't need to zoom. + imgUrl += "&miny=" + Double.toString(zoom[2]); + imgUrl += "&maxy=" + Double.toString(zoom[3]); + } } return imgUrl; @@ -526,10 +534,18 @@ double[] zoom = getZoomValues(); if (zoom != null) { - attr.put("minx", Double.toString(zoom[0])); - attr.put("maxx", Double.toString(zoom[1])); - attr.put("miny", Double.toString(zoom[2])); - attr.put("maxy", Double.toString(zoom[3])); + if (zoom[0] != 0 || zoom[1] != 1) { + // a zoom range of 0-1 means displaying the whole range. In such + // case we don't need to zoom. + attr.put("minx", Double.toString(zoom[0])); + attr.put("maxx", Double.toString(zoom[1])); + } + if (zoom[2] != 0 || zoom[3] != 1) { + // a zoom range of 0-1 means displaying the whole range. In such + // case we don't need to zoom. + attr.put("miny", Double.toString(zoom[2])); + attr.put("maxy", Double.toString(zoom[3])); + } } return attr;