Mercurial > dive4elements > river
changeset 548:aff225e07720
Repaired broken zoom-out control.
flys-client/trunk@2058 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 06 Jun 2011 11:56:15 +0000 |
parents | 95a7f9cb3d58 |
children | e74bf6bfeeb6 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java |
diffstat | 2 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Mon Jun 06 11:31:21 2011 +0000 +++ b/flys-client/ChangeLog Mon Jun 06 11:56:15 2011 +0000 @@ -1,3 +1,9 @@ +2011-06-06 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java: + Repaired broken zoom-out control. We will now zoom out for 10% of the + axis range. E.g. range before = 2 - 10 , range after = 1.2 - 10.8 + 2011-06-06 Ingo Weinzierl <ingo@intevation.de> flys/issue131 (Anzeige der Position bei großen Zahlen ungenau)
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java Mon Jun 06 11:31:21 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java Mon Jun 06 11:56:15 2011 +0000 @@ -180,10 +180,13 @@ return; } - xrange[0] -= xrange[0] / 100 * factor; - xrange[1] += xrange[1] / 100 * factor; - yrange[0] -= yrange[0] / 100 * factor; - yrange[1] += yrange[1] / 100 * factor; + double xadd = (xrange[1] - xrange[0]) / 100 * factor; + double yadd = (yrange[1] - yrange[0]) / 100 * factor; + + xrange[0] -= xadd; + xrange[1] += xadd; + yrange[0] -= yadd; + yrange[1] += yadd; updateChartPanel(); }