Retaining link shape when moving node


#1

In a document using a Layered Digraph layout, what do you have to do to make the links retain their shapes when dragging the nodes around after a layout has been performed. The layout sample app does this but I am unable to get it to work in my app. When I move a node in my document, the links connected to it instantly get straightened out.


#2

Try setting GoLink.AdjustingStyle.


#3

I did that, just as it was in the layout demo with the foolowing code:
foreach (GoObject obj in MyGoView.Document)
{
GoLabeledLink link = obj as GoLabeledLink;
if (link != null)
{
link.AdjustingStyle = GoLinkAdjustingStyle.Calculate;
}
}
Is there a problem retaining the shapes when using GoLabeledlinks rather than GoLinks? Because that is the only thing I can see different between my code and the layout demo.


#4

Actually, I figured it out. GoLinkAdjustingStyle.Scale does the trick.
Thanks