From: Marko Luukkainen Date: Thu, 15 Dec 2022 12:11:27 +0000 (+0200) Subject: Improved line gaps X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=09a9c050ed913423f19d720189e8fe68c0086e8b;p=simantics%2Fplatform.git Improved line gaps Fixed multi-gap handling (stored relative coordinate for the next gap, when absolute coordinate was expected). gitlab #888 Change-Id: I8949a389890fcf0423b29c692c580a07fc600928 --- diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java index 2367805ca..634908884 100644 --- a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java +++ b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java @@ -229,14 +229,15 @@ public class ConnectionCrossings implements PathModifier { path2.lineTo(l.x1 + pos2 * dx, l.y1 + pos2 * dy); } if (pos3 < len) { + pos = pos3; pos3 *= len1; double x = l.x1 + pos3 * dx; double y = l.y1 + pos3 * dy; prevGapEnd = new Point2D.Double(x, y); } else { + pos = pos3; finish = false; } - pos = pos3; } if (finish) {