Change In Link

Dear Sir,

I want to know that when we make some change in the layout through
layout setting and save .When we open this saved layout layout are
retrieving same way as we saved but link is not coming properly link
become short they are touch node properly Please Check the code which
we are using and provide solution its very urgent.

I am attaching two images in which we have layout before change and after change.

The code we done in GraphLinkXml class as

public class GraphLinkXml : GoXmlTransformer
{
public GraphLinkXml()
{
this.TransformerType = typeof(GraphLink);
this.ElementName = “Link”;
}

    public override void GenerateAttributes(Object obj)
    {
        base.GenerateAttributes(obj);
        GraphLink gLink = (GraphLink)obj;
        GraphNode gNode;

        gNode = gLink.FromNode as GraphNode;
        if (gNode != null)
        {
            String fromId = this.Writer.FindShared(gNode);
            WriteAttrVal("FromId", fromId);
        }

        gNode = gLink.ToNode as GraphNode;
        if (gNode != null)
        {
            String toId = this.Writer.FindShared(gNode);
            WriteAttrVal("ToId", toId);
        }

        WriteAttrVal("points", gLink.CopyPointsArray());
    }

    public override void ConsumeAttributes(Object obj)
    {
        base.ConsumeAttributes(obj);
        GraphLink gLink = (GraphLink)obj;
        String nodeId;
        
        nodeId = StringAttr("FromId", null);
        if (nodeId != null)
        {
            gLink.FromPort = ((GraphNode)this.Reader.FindShared(nodeId)).FromPort;
        }

        nodeId = StringAttr("ToId", null);
        if (nodeId != null)
        {
            gLink.ToPort = ((GraphNode)this.Reader.FindShared(nodeId)).ToPort;
        }

        gLink.SetPoints(PointFArrayAttr("points", null));
    }

}
}

Layout Before making change through layout property:

                       <font color="#0000ff"> Link before change</font>

Layout after making change through layout property:

           Link after change

I don’t understand the relationship between the 2 pictures you provide. For example, I don’t see a CHENNA/SOUTH or Regular nodes in the second picture.

Have you looked at the xml file that is generated to see if it looks like it has the right data? (This is simpler if you can reproduce the problem with a smaller number of nodes and links.)

Sir,

Both pictures are same first one before change in layout property and second one after change in layout property I am just talking about the the link length after change in layout property the link length become short means they are not touching node properly.

What layout property did you change? At this point, I don’t understand if you asking about XML save/restore or GoLayout…

Sir,

I have changed Layout property Tree Construction Path Property

Destination are Children ------->Source are Children

OK, so you changed the value of GoLayoutTree.Path, which accounts for the weird layout you are getting, with the links all looping around, and with so many nodes appearing to be roots of the tree. I wouldn’t do that if I were you, since changing the path in this case really results in a graph that isn’t a tree at all.

But it seems as if you are asking about the distance of the end point of a link from the body of the node it is connected to. In that respect I do not see a difference between the two screenshots you posted.