X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.network.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fui%2Fadapters%2FDistrictNetworkEdgeElement.java;h=34424739eb9a0764dbab3d7338a183b86994ff29;hb=d4d53a3987be0c2b771c8093b7e8c2286738a6c8;hp=d47580074a9d5a3ef23855bc78745d44be726d4d;hpb=8364294edf86a6915ae3fe7eade555d95fd7e435;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkEdgeElement.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkEdgeElement.java index d4758007..34424739 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkEdgeElement.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkEdgeElement.java @@ -105,7 +105,7 @@ public class DistrictNetworkEdgeElement { if (size == null) size = new Rectangle2D.Double(); if (edge != null) - size.setFrame(DistrictNetworkEdgeNode.calculatePath(edge, null).getBounds2D()); + size.setFrame(DistrictNetworkEdgeNode.calculatePath(edge, null, false).getBounds2D()); else LOGGER.debug("Element {} does not have edge!", e); @@ -116,7 +116,7 @@ public class DistrictNetworkEdgeElement { public Shape getElementShape(IElement e) { DistrictNetworkEdge edge = e.getHint(KEY_DN_EDGE); if (edge != null) { - return DistrictNetworkEdgeNode.calculatePath(edge, null); + return DistrictNetworkEdgeNode.calculatePath(edge, null, false); } else { return getBounds(e, null); } @@ -163,7 +163,7 @@ public class DistrictNetworkEdgeElement { } private boolean pickIntersectingObjects(DistrictNetworkEdge edge, Rectangle2D bounds) { - double tolerance = (bounds.getHeight() + bounds.getHeight()) * 0.25 / MapScalingTransform.getScaleX(); + double tolerance = (bounds.getHeight() + bounds.getHeight()) * 1 / MapScalingTransform.getScaleX(); Line2D line = new Line2D.Double(edge.getStartPoint(), edge.getEndPoint()); double sx = bounds.getCenterX() / MapScalingTransform.getScaleX(); double sy = bounds.getCenterY() / MapScalingTransform.getScaleY();