Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Tree Layout node moving wildly around (Read 1848 times)
paulwhit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Oct 4th, 2007
Tree Layout node moving wildly around
Oct 10th, 2007 at 5:25pm
Print Post  
I am using the following diagram settings

diagram = new Diagram();
diagram.MeasureUnit = GraphicsUnit.Pixel;
diagram.Font = new Font("Arial", 10, GraphicsUnit.Point);
diagram.Bounds = new RectangleF(0, 0, 600, 400);
diagram.BackBrush = new MindFusion.Drawing.SolidBrush(Color.White);
diagram.SelectAfterCreate = false;
diagram.AdjustmentHandlesSize = 6;
diagram.DefaultShape = Shapes.Rectangle;
diagram.RoundedLinks = true;
diagram.RoundedLinksRadius = 12;
diagram.LinkHeadShape = ArrowHead.BowArrow;
diagram.LinkHeadShapeSize = 8;

With the following tree layout settings

TreeLayout tl = new TreeLayout();
tl.Type = TreeLayoutType.Centered;
tl.Direction = TreeLayoutDirection.TopToBottom;
tl.LinkStyle = TreeLayoutLinkType.Straight;
tl.Anchoring = Anchoring.Keep;
tl.MultipleGraphsOrientation = MindFusion.Diagramming.Layout.Orientation.Horizontal;
tl.Arrange(diagram);
diagram.ResizeToFitItems(20);

One of the nodes moves around wildly from very close to very far away from its parent, each time I refresh the page. For example, "Documentation Specialist II" in these two images, which are refreshes of the same page.

[img]http://paulw.us/flowchart1.jpg[/img]
[img]http://paulw.us/flowchart2.jpg[/img]

Is there a way to stop this from moving around so wildly?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tree Layout node moving wildly around
Reply #1 - Oct 10th, 2007 at 6:46pm
Print Post  
It should work better if TreeLayout.ReversedLinkDirection is enabled. Otherwise, the root detection functions designates Specialist 3 as the tree root, and not the CEO. Then Specialist 2 would not be considered a part of the tree at all, since it cannot be reached from the root by following the specified link direction. Another possibility is to enable IgnoreLinkDirection, but then you will need to specify the Root yourself.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint