Corridor highways enter End from left face with spread drop positions
Corridor routes now drop vertically to the LEFT of the End node and approach from the left face (consistent with LTR flow direction). Drop X positions spread by 2x nodeSizeClearance to avoid convergence. Entry Y positions at 1/3 and 2/3 of End's height for visual separation. Remaining visual issue: edges from "Has Recipients", "Email Dispatch", and "Set emailDispatchFailed" are ~300px below End and must bend UP to reach it. The 90-degree bend at the transition looks disconnected at small rendering scales. This is inherent to the graph topology. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -319,13 +319,30 @@ internal static partial class ElkEdgeRouterIterative
|
|||||||
var src = cpath[0];
|
var src = cpath[0];
|
||||||
var tgt = cpath[^1];
|
var tgt = cpath[^1];
|
||||||
var stubX = src.X + 24d;
|
var stubX = src.X + 24d;
|
||||||
|
var tgtNode = nodesById.TryGetValue(edge.TargetNodeId ?? string.Empty, out var tn) ? tn : null;
|
||||||
// Large vertical separation (2x nodeSizeClearance) between
|
// Large vertical separation (2x nodeSizeClearance) between
|
||||||
// corridors so they're visually distinct. Simple vertical
|
// corridors so they're visually distinct.
|
||||||
// drop to target — no right-side wrapping that congests
|
|
||||||
// the area near the End node.
|
|
||||||
var localCorridorY = baseCorridorY - (corridorFixed * (nodeSizeClearance * 2d));
|
var localCorridorY = baseCorridorY - (corridorFixed * (nodeSizeClearance * 2d));
|
||||||
|
|
||||||
List<ElkPoint> newPath;
|
List<ElkPoint> newPath;
|
||||||
|
if (tgtNode is not null)
|
||||||
|
{
|
||||||
|
// Drop to left of target, then approach from the left face.
|
||||||
|
// All End-targeting edges enter from the same direction for
|
||||||
|
// a clean fan-in instead of a 3-face tangle.
|
||||||
|
var dropX = tgtNode.X - 24d - (corridorFixed * (nodeSizeClearance * 2d));
|
||||||
|
var entryY = tgtNode.Y + (tgtNode.Height * (0.33d + corridorFixed * 0.34d));
|
||||||
|
newPath =
|
||||||
|
[
|
||||||
|
src,
|
||||||
|
new() { X = stubX, Y = src.Y },
|
||||||
|
new() { X = stubX, Y = localCorridorY },
|
||||||
|
new() { X = dropX, Y = localCorridorY },
|
||||||
|
new() { X = dropX, Y = entryY },
|
||||||
|
new() { X = tgtNode.X, Y = entryY },
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
newPath =
|
newPath =
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user