# HG changeset patch # User Ingo Weinzierl # Date 1308909205 0 # Node ID e59f2569558ec011c2f9a62e570ef2c54c3d2894 # Parent 854312c0528c67f7743a92ebdf30389e800aabb8 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 diff -r 854312c0528c -r e59f2569558e flys-client/ChangeLog --- 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 + + * 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 flys/issue21 (Gleiches Projekt kann mehr als einmal gleichzeitig geƶffnet werden) diff -r 854312c0528c -r e59f2569558e flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java --- 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;