Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Tree layout draws in wrong order (Read 1558 times)
jtexter3
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: May 28th, 2008
Tree layout draws in wrong order
Mar 18th, 2009 at 8:55pm
Print Post  
With FlowChart.NET 5.2, my tree is drawn in the wrong order (i.e. leaf nodes are left to right, not right to left).  Reverting to the 5.1 DLL's with no code changes works just fine.  Is there a change I need to make with 5.2, or is this just a bug?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Tree layout draws in wrong order
Reply #1 - Mar 19th, 2009 at 8:33am
Print Post  
In version 5.1.1 we marked the TreeLayoutDirections enumeration as [Flags] and changed the values of its fields as follows:

TopToBottom = 0x1
BottomToTop = 0x2
LeftToRight = 0x4
RightToLeft = 0x8

Thus, if you are casting an integer value to this enum type you should consider the above changes. For example, ((TreeLayoutDirections)4) resolves to RightToLeft in pre-5.1.1 while in 5.1.1 and later it will resolve to LeftToRight.

This is an undocumented change and we apologize for the inconvenience.

Regards,
Meppy
  
Back to top
 
IP Logged
 
jtexter3
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: May 28th, 2008
Re: Tree layout draws in wrong order
Reply #2 - Mar 19th, 2009 at 1:20pm
Print Post  
Well, I'm not using an integer.  My function for creating the layout is as follows:

protected TreeLayout CreateTreeLayout(DiagramNode rootNode)
{
TreeLayout result = new TreeLayout(rootNode,
     TreeLayoutType.Cascading,
     false,
     TreeLayoutLinkType.Rounded,
     TreeLayoutDirections.TopToBottom,
     10,
     15,
     true,
     new System.Drawing.SizeF(10, 10));

     return result;
}

I've tried setting the direction to TreeLayoutDirections.TopToBottom | TreeLayoutDirections.LeftToRight, but that just causes all of the nodes to draw on top of each other.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Tree layout draws in wrong order
Reply #3 - Mar 19th, 2009 at 1:53pm
Print Post  
I have tested here with the settings you supplied and it seems to be working fine. Is it possible for you to create a new sample application that loads a diagram from a file and applies the tree layout to it, then send this application and the diagram file to me via e-mail?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tree layout draws in wrong order
Reply #4 - Mar 25th, 2009 at 11:31am
Print Post  
If the problem was the order of child nodes under a parent, it should be fixed in this version:
https://mindfusion.eu/_temp/fcnet_slfix.zip
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint