Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Diagram arranging (Read 6593 times)
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Diagram arranging
Reply #15 - Aug 11th, 2016 at 1:23pm
Print Post  
Yes, SecondProbe.txt reproduced that, our developer will investigate.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Diagram arranging
Reply #16 - Aug 12th, 2016 at 7:45am
Print Post  
It seems OrthogonalRouter's path-finding fails when the links start from center of node, and for some reason the ones rebuilt from your view-model are like that in the saved file, except one link. Until we fix the path-finding code, you could work around it by moving the end points of self-loops to the node's border before calling Arrange -

Code
Select All
diagram.LoadFromXml("SecondProbe.txt");

foreach (var link in diagram.Links.Where(l => l.Origin == l.Destination))
{
	var r = link.Origin.Bounds;
	link.StartPoint = link.EndPoint =
		new Point(r.X + r.Width / 2, r.Y);
	link.UpdateFromPoints();
}

new OrthogonalRouter().Arrange(diagram); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
monkeydll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 27th, 2016
Re: Diagram arranging
Reply #17 - Aug 12th, 2016 at 12:46pm
Print Post  
Thank you. It is better now.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint