Mercurial > dive4elements > river
changeset 1574:465f72f68cee
Fix strange javascript side effects.
flys-client/trunk@3839 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 31 Jan 2012 14:25:51 +0000 |
parents | 0fbbcec35462 |
children | 0f2b94408bd1 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java |
diffstat | 2 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Tue Jan 31 14:10:23 2012 +0000 +++ b/flys-client/ChangeLog Tue Jan 31 14:25:51 2012 +0000 @@ -1,3 +1,9 @@ +2012-01-31 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java: + Fix strange "javascript-npes" which occurred when clicking and + pressing enter too fast. + 2012-01-31 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Tue Jan 31 14:10:23 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Tue Jan 31 14:25:51 2012 +0000 @@ -403,11 +403,13 @@ public void onSuccess(Map<Integer, Double[]> obj) { Double[] kms = obj.get(dbid); double closest = - CrossSectionChartThemePanel.closest(kms, - enteredKm); + CrossSectionChartThemePanel.closest(kms, enteredKm); GWT.log("Got single km for " + dbid + ", it is " + closest); - item.setValue(closest); + + // Do not set value, as it will trigger strange + // "javascript" bugs. + //item.setValue(closest); if (synchronNavigation) { // Feed many ... // Find all activated cross section themes @@ -421,8 +423,7 @@ artifacts.add(artifactReference(theme.getArtifact())); } } - sendFeed(artifacts, - closest); + sendFeed(artifacts, closest); } else { sendFeed(facetRecord.getTheme().getArtifact(),