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