Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Links overwriting ShapeNodes in TreeLayout (Read 1628 times)
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Links overwriting ShapeNodes in TreeLayout
Aug 10th, 2018 at 3:07pm
Print Post  
With a LevelDistance set to 10 I get links overwriting ShapesNodes when I redraw my chart using TreeLayout (See attached PNG). Increasing LevelDistance to 15 fixes the problem but my client says the diagram takes up too much vertical space. Can I keep my chart compact vertically without the annoying overwrite of ShapeNodes?

DavidL
  

Capture_006.PNG ( 12 KB | 129 Downloads )
Capture_006.PNG
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Links overwriting ShapeNodes in TreeLayout
Reply #1 - Aug 13th, 2018 at 9:08am
Print Post  
These are attached nodes and you run the layout using KeepGroupLayout option? Our developer will investigate why links are not centered, for time being you could offset the horizontal segments after arranging -

Code
Select All
tl.Arrange(diagram);

foreach (var link in diagram.Links)
{
	var midY = (link.StartPoint.Y + link.EndPoint.Y) / 2;

	var p1 = link.ControlPoints[1];
	p1.Y = midY;
	link.ControlPoints[1] = p1;

	var p2 = link.ControlPoints[2];
	p2.Y = midY;
	link.ControlPoints[2] = p2;

	link.UpdateFromPoints();
} 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Links overwriting ShapeNodes in TreeLayout
Reply #2 - Aug 13th, 2018 at 9:52am
Print Post  
Many thanks, that code works well (I do have to check on the number of ControlPoints). I can confirm that KeepGroupLayout is true.

Thanks again,
DavidL
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint