From 2445ecb547cda02fa6843478a777b00a7b927c72 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Mon, 18 Feb 2019 18:14:53 +0200 Subject: [PATCH] Increase baseline size of vertices 10-fold to improve visibility. gitlab #27 Change-Id: Iace3eaab32a06312e094d92b449a2780867fee2f --- .../network/ui/nodes/DistrictNetworkVertexNode.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.47.1