Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Node centering issue in tree layout with anchors not in the center (Read 2848 times)
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Node centering issue in tree layout with anchors not in the center
Jun 9th, 2014 at 1:36pm
Print Post  
Hi Stoyo,

I'm having an issue in TreeLayout when I use the side by side vertical layout (i.e. nodes in the same branch are laid out on the left and right side of the vertical branch.  The problem is that the content of my nodes is not centered so to have it look nice I have defined anchors at 33,0 and 33, 100.  This works fine (i have Anchor.AutoReassign in the layout),  but not for nodes that are on the left part of the side by side vertical branch which are "shifted to the right and so overlap the vertical middle line. It looks like the layout still uses the middle of the node.   How can I fix this?

Thanks,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node centering issue in tree layout with anchors not in the center
Reply #1 - Jun 9th, 2014 at 1:50pm
Print Post  
Hi,

Could you post your layout code and a sample diagram xml file?

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


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Re: Node centering issue in tree layout with anchors not in the center
Reply #2 - Jun 9th, 2014 at 2:05pm
Print Post  
Stoyan,

I sent you an email with screenshots. Let me know if this is enough, if not I'll try to extract some code.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node centering issue in tree layout with anchors not in the center
Reply #3 - Jun 10th, 2014 at 8:21am
Print Post  
You should be able to center the symbols by offsetting all non-assistant node rectangles by the horizontal distance from the symbol center to actual node center. Call the SetBounds(false, false) overload to move nodes without modifying the link paths set by TreeLayout.

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


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Re: Node centering issue in tree layout with anchors not in the center
Reply #4 - Jun 10th, 2014 at 6:58pm
Print Post  
Hi Stoyan,

Thanks!  This works. I actually tried this but I was stupidly using Move() instead of SetBounds and obviously this was moving the links as well.

JF
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint