Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Layered Layout direction (Read 28728 times)
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #30 - Aug 3rd, 2009 at 2:07pm
Print Post  
Stoyan,

Has the polyline been made available as line type for Layered Layout yet?

If not, when do you think this can be made available?

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #31 - Aug 3rd, 2009 at 7:11pm
Print Post  
LayeredLayout.LinkType = Straight sets the links Style to Polyline and inserts a control point for each layer the link passes through. Do you need something different than this?
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #32 - Aug 3rd, 2009 at 7:33pm
Print Post  
Thank you but I am not able to get the result that you've described. I will send you an e-mail shortly with an attachment.

Thank you
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #33 - Aug 5th, 2009 at 10:01am
Print Post  
You could insert an additional point at each end of the link to implement that:

Code
Select All
private void miLayoutLayered_Click(object sender, EventArgs e)
{
	LayeredLayout ll = new LayeredLayout();
	ll.Orientation = MindFusion.Diagramming.Layout.Orientation.Horizontal;
	ll.Arrange(diagram);

	foreach (DiagramLink link in diagram.Links)
	{
		PointCollection p = link.ControlPoints;

		PointF sp = p[0];
		p.Insert(1, new PointF(sp.X + 5, sp.Y));

		PointF ep = p[p.Count - 1];
		p.Insert(p.Count - 1, new PointF(ep.X - 5, ep.Y));

		link.UpdateFromPoints(false, true);
	}
}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #34 - Aug 5th, 2009 at 1:56pm
Print Post  
Thank you. I was wondering if there was a way to set all lines to have exactly two points (three segment) specifically while minimizing total distance and overlap with a node. The first and last segment would be horizontal.

Thank you for your help.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #35 - Aug 5th, 2009 at 3:37pm
Print Post  
You need to shift the nodes in such a way that links that pass across more than one layer do not bend?
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #36 - Aug 5th, 2009 at 4:22pm
Print Post  
I think it mainly has to do with how the lines are drawn.
Let is what I am getting now and right is what I am trying to get to.

As you may notice, the line in the example have three segments (at most) that goes across the layers if necessary.

http://64.56.212.64/netDiagram/Slide.jpg
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #37 - Aug 6th, 2009 at 8:31am
Print Post  
It might be possible; could you email the saved xml for that diagram to support@mindfusion.eu, along with your layout code?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #38 - Aug 10th, 2009 at 8:18am
Print Post  
We have added a StraightenLongLinks property that will let you get a similar layout. You can find the updated version on the PM page. Now the file you sent us is laid out as shown below:

Code
Select All
private void miLayoutLayered_Click(object sender, EventArgs e)
{
	LayeredLayout ll = new LayeredLayout();
	ll.Orientation = MindFusion.Diagramming.Layout.Orientation.Horizontal;
	ll.EnforceLinkFlow = true;
	ll.StraightenLongLinks = true;
	ll.NodeDistance *= 7;
	ll.LayerDistance *= 3;
	ll.Arrange(diagram);
}
 





Currently it ignores the node sizes; we'll implement that in the next few days, along with better centering of short links.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #39 - Aug 11th, 2009 at 6:24am
Print Post  
Now StraightenLongLinks supports nodes of different size and finds better positions for closer nodes. You can find the new build on the PM page.

  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #40 - Aug 12th, 2009 at 1:37am
Print Post  
Stoyo,

Thank you very much for this. I have tested the property on the back-end but I am running an applet and in this case

ll.setStraightenLongLinks(true);

doesn't seem to work. Is this the correct syntax?

Thank you again.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #41 - Aug 12th, 2009 at 6:53am
Print Post  
We haven't implemented this in the Java applet yet.

Stoyan
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #42 - Aug 12th, 2009 at 2:59pm
Print Post  
Stoyan,

Thank you for the confirmation. Do you know how soon this would be implemented in Java Applet?

Thank you.
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #43 - Aug 17th, 2009 at 3:46pm
Print Post  
Stoyan,

I was wondering if you had any estimate when this new feature would be available in Java Applet.

Thank you,

James
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #44 - Aug 17th, 2009 at 5:15pm
Print Post  
We won't have a Java developer available to implement this at least for a couple of weeks.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint