Mercurial > dive4elements > river
changeset 2484:6f30bbd98618
Small fix for retrieving closest km.
flys-client/trunk@4260 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 18 Apr 2012 09:03:08 +0000 |
parents | f9a7a5ae914c |
children | 26fc6163643d |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java |
diffstat | 2 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Wed Apr 18 08:10:17 2012 +0000 +++ b/flys-client/ChangeLog Wed Apr 18 09:03:08 2012 +0000 @@ -1,3 +1,12 @@ +2012-04-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java: + (closest): Fix bug that prevented that always the closest km was fetched. + +2012-04-18 Raimund Renkert <raimund.renkert@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java: + Open the ManualDatePointsEditor from context menu. 2012-04-18 Raimund Renkert <raimund.renkert@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Wed Apr 18 08:10:17 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Wed Apr 18 09:03:08 2012 +0000 @@ -16,7 +16,9 @@ import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.ListGridFieldType; +import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.Canvas; +import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; @@ -37,6 +39,8 @@ import com.smartgwt.client.widgets.menu.Menu; import com.smartgwt.client.widgets.menu.MenuItem; + +import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.menu.events.ClickHandler; import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent; @@ -154,7 +158,6 @@ } - /** * Sets currentCSMasterUUID. */ @@ -288,7 +291,7 @@ if (in[i] == to) { return to; } - double diff = Math.abs(to - in[0]); + double diff = Math.abs(to - in[i]); if (diff < minDiff) { minDiff = diff; bestMatch = in[i]; @@ -431,7 +434,7 @@ Double[] kms = obj.get(dbid); double closest = CrossSectionChartThemePanel.closest(kms, enteredKm); - GWT.log("Got single km for " + dbid + ", it is " + GWT.log("Got single km close to " + enteredKm + " for " + dbid + ", it is " + closest); // Do not set value, as it will trigger strange