]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Increase baseline size of vertices 10-fold to improve visibility. 56/2656/2
authorReino Ruusu <reino.ruusu@semantum.fi>
Mon, 18 Feb 2019 16:14:53 +0000 (18:14 +0200)
committerJani Simomaa <jani.simomaa@semantum.fi>
Tue, 19 Feb 2019 17:04:57 +0000 (17:04 +0000)
gitlab #27

Change-Id: Iace3eaab32a06312e094d92b449a2780867fee2f

org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkVertexNode.java

index d063d48c4982d30ee08af9ce18e8b0868179b8ba..10cfa905805a52fdf22f9e3f6875fa6db66fd960 100644 (file)
@@ -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);
         }