Congruent links


#1

When multiple links connect the same two single-port nodes, what is the recommended means of ensuring the links are visually distinct?

For the non-orthogonal Bezier style, adjusting the curviness worked well, but for other link styles, we’re stumped.


#2

What are the link and port properties you are dealing with?
For Orthogonal links, it is moderately common to override GetMidOrthoPosition, as OrgCharter.GraphLink does in Samples\OrgCharter\GraphDoc.cs. In that case it is purposely trying to have all of the links overlap as much as possible, but you could have it return different values, instead of always returning the midpoint as the default implementation does.


#3

Port properties are as delivered with the stock GoIconicNode. Labeled link properties are menu-selectable among ortho on/off, line, curved line, Bezier. Two links from node A to node B appear as one, so we’re looking for advice on the appropriate intervention to take, and should this be programmatic or user.
I recall a sample where a segment break could be introduced with a mouse click, but we’re not sure that this is appropriate UI design for our app. Dragging the link to a new shape could work, a sample sure would be helpful here. Or perhaps there are other avenues to explore?
Btw the situation being modeled is this: the graph represents program source code for which the object code is XML. Graph nodes may represent actions, such as Play Audio. Links from action nodes are labeled with the result of the action, such as success, failure, timeout, default. Frequently multiple results, such as failure and timeout, must link to the same result node, e.g. some error action.


#4

The StateCharter example lets users modify the Bezier curve. The override of DoResize in the TransitionLink class sets the AdjustingStyle property to a non-Calculate value, so that it remembers the shape of the path even when users move either node.
Is there a reason that Bezier curves aren’t appropriate for your application? Clearly you can’t have just a single straight line, because there’s only one such line between any two points.


#5

Well, the links already have a context menu that permits changing the link to any style, therefore, this option has become an “entitlement”, and as we all know from politics, it is far easier to create one than take it away. :)
Levity aside, is it convenient to be able to mix in the segmented rounded line style with the Bezier styles.
Thanks for the pointer to the reshaping sample code. Given that, I imagine we can just force the link style to Bezier when the link count between two nodes exceeds 1.