From: Reino Ruusu Date: Mon, 18 Feb 2019 16:14:53 +0000 (+0200) Subject: Increase baseline size of vertices 10-fold to improve visibility. X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F2656%2F2;p=simantics%2Fdistrict.git Increase baseline size of vertices 10-fold to improve visibility. gitlab #27 Change-Id: Iace3eaab32a06312e094d92b449a2780867fee2f --- diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java index d063d48c..10cfa905 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java @@ -77,11 +77,11 @@ public class DistrictNetworkVertexNode extends G2DParentNode implements ISelecti Color newColor = dynamicColor != null ? dynamicColor : color; boolean changeColor = !oldColor.equals(newColor); - double viewScaleRecip = 1; + double viewScaleRecip = 10; if (scaleStroke) { double scale = GeometryUtils.getScale(g2d.getTransform()); scale = Math.max(10000, Math.min(scale, 50000)); - viewScaleRecip = 1.0 / scale; + viewScaleRecip /= scale; } double scaleRecip = viewScaleRecip * nodeSize; @@ -92,7 +92,7 @@ public class DistrictNetworkVertexNode extends G2DParentNode implements ISelecti if (NodeUtil.isSelected(this, 1)) { changeColor = true; g2d.setColor(SELECTION_COLOR); - BasicStroke ss = GeometryUtils.scaleStroke(STROKE, (float) viewScaleRecip*5); + BasicStroke ss = GeometryUtils.scaleStroke(STROKE, (float) (viewScaleRecip*0.5)); g2d.setStroke(ss); g2d.draw(toDraw); }