Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java @ 8607:2010da0904b7
(issue1754) Fix radius caluculation inf CurveFilter if Start > End
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 24 Mar 2015 10:50:46 +0100 |
parents | 92a2b9b691e1 |
children | 421e5cceac84 |
comparison
equal
deleted
inserted
replaced
8606:c985b27e3a8c | 8607:2010da0904b7 |
---|---|
37 WKms result = (WKms)super.getData(artifact, context); | 37 WKms result = (WKms)super.getData(artifact, context); |
38 | 38 |
39 Double start = (Double)context.getContextValue("startkm"); | 39 Double start = (Double)context.getContextValue("startkm"); |
40 Double end = (Double)context.getContextValue("endkm"); | 40 Double end = (Double)context.getContextValue("endkm"); |
41 if(start != null && end != null) { | 41 if(start != null && end != null) { |
42 if (start > end) { | |
43 Double buf = start; | |
44 start = end; | |
45 end = buf; | |
46 } | |
42 RiverContext fc = (RiverContext)context.globalContext(); | 47 RiverContext fc = (RiverContext)context.globalContext(); |
43 // Adaptive smoothing, based on zoom factor/diagram extents. | 48 // Adaptive smoothing, based on zoom factor/diagram extents. |
44 ZoomScale scales = (ZoomScale)fc.get("zoomscale"); | 49 ZoomScale scales = (ZoomScale)fc.get("zoomscale"); |
45 RiverAccess access = new RiverAccess((D4EArtifact)artifact); | 50 RiverAccess access = new RiverAccess((D4EArtifact)artifact); |
46 String river = access.getRiverName(); | 51 String river = access.getRiverName(); |