comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java @ 8609:421e5cceac84

(issue1754) Better fix for radius calculation then 8607:2010da0904b7 Checking for that lower < upper is guranteed in radius calculation makes more sense to do centrally in ZoomScale. This also works for the MINFO Filter facets.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 24 Mar 2015 11:06:47 +0100
parents 2010da0904b7
children a805211690f7
comparison
equal deleted inserted replaced
8608:0f6f702742b4 8609:421e5cceac84
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 }
47 RiverContext fc = (RiverContext)context.globalContext(); 42 RiverContext fc = (RiverContext)context.globalContext();
48 // Adaptive smoothing, based on zoom factor/diagram extents. 43 // Adaptive smoothing, based on zoom factor/diagram extents.
49 ZoomScale scales = (ZoomScale)fc.get("zoomscale"); 44 ZoomScale scales = (ZoomScale)fc.get("zoomscale");
50 RiverAccess access = new RiverAccess((D4EArtifact)artifact); 45 RiverAccess access = new RiverAccess((D4EArtifact)artifact);
51 String river = access.getRiverName(); 46 String river = access.getRiverName();

http://dive4elements.wald.intevation.org