Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java @ 9099:850ce16034e9
2.3.4.1.10 Berechnung mit Start-km > End-km
author | gernotbelger |
---|---|
date | Mon, 28 May 2018 13:22:45 +0200 |
parents | 02739b8c010d |
children | 9be51f776798 |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java Mon May 28 10:56:57 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java Mon May 28 13:22:45 2018 +0200 @@ -161,8 +161,8 @@ final FixFilter filter = art.getFilter(); filter.setRiver(info.getRiver()); if (filter.getCurrentKm() == -Double.MAX_VALUE || filter.getCurrentKm() == -1d) { - filter.setCurrentKm(info.getFrom()); - filter.setToKm(info.getTo()); + filter.setCurrentKm(filter.getLowerKm()); + filter.setToKm(filter.getUpperKm()); } if (FixationPanel.this.kmText != null) { final NumberFormat nf = NumberFormat.getDecimalFormat(); @@ -175,7 +175,7 @@ } } eventPane.setContents(FixationPanel.this.htmlOverview); - updateChartTab(FixationPanel.this.fixInfo.getFrom()); + updateChartTab(FixationPanel.this.fixInfo.getLowerKm()); FixationPanel.this.events.setPane(eventPane); success(); } @@ -261,19 +261,20 @@ final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) this.artifact; + // was soll das all if (this.fixInfo != null) { - if (km < this.fixInfo.getFrom()) - km = this.fixInfo.getFrom(); - if (km > this.fixInfo.getTo()) - km = this.fixInfo.getTo(); + if (km < this.fixInfo.getLowerKm()) + km = this.fixInfo.getLowerKm(); + // if (km > this.fixInfo.getTo()) + // km = this.fixInfo.getTo(); } final FixFilter filter = art.getFilter(); - if (km < filter.getFromKm()) - km = filter.getFromKm(); - if (km > filter.getToKm()) - km = filter.getToKm(); + if (km < filter.getLowerKm()) + km = filter.getLowerKm(); + if (km > filter.getUpperKm()) + km = filter.getUpperKm(); filter.setCurrentKm(km); @@ -307,7 +308,7 @@ final FixFilter filter = art.getFilter(); final double curr = filter.getCurrentKm(); - if (curr > filter.getFromKm()) { + if (curr > filter.getLowerKm()) { final double newVal = (curr - 0.1) * 10; final long round = Math.round(newVal); updateChartTab(((double) round) / 10); @@ -321,7 +322,7 @@ final FixFilter filter = art.getFilter(); final double curr = filter.getCurrentKm(); - if (curr < filter.getToKm()) { + if (curr < filter.getUpperKm()) { final double newVal = (curr + 0.1) * 10; final long round = Math.round(newVal); updateChartTab(((double) round) / 10); @@ -383,8 +384,8 @@ public String getChartFilter(final FixFilter filter, final int width, final int height) { final String river = filter.getRiver(); final double currentKm = filter.getCurrentKm(); - final double fromKm = filter.getFromKm(); - final double toKm = filter.getToKm(); + final double fromKm = filter.getLowerKm(); + final double toKm = filter.getUpperKm(); if (river != null && river.length() > 0 && currentKm >= fromKm && currentKm <= toKm) { final JSONObject jfix = new JSONObject(); @@ -411,8 +412,8 @@ } protected static JSONObject createFilter(final FixFilter filter, final JSONObject root) { - final double fromKm = filter.getFromKm(); - final double toKm = filter.getToKm(); + final double fromKm = filter.getLowerKm(); + final double toKm = filter.getUpperKm(); final boolean hasDate = filter.hasDate(); if (fromKm >= 0 && toKm >= 0 && fromKm <= toKm) {