Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic TreeLayout - LayoutTraits - SideBySide - box position (Read 1519 times)
Gabriel
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 30
Joined: Oct 9th, 2012
TreeLayout - LayoutTraits - SideBySide - box position
Feb 3rd, 2014 at 9:38am
Print Post  
Hello,
I'm using the EnableAssistants property alongside the "assistantType = Normal" to reproduce a "sidebyside" arrangement of the childs of a root node.

I would like to know if there any way to know if the child node is arranged at the left or at the right of its parent directly without calculating it using the node coordinates.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TreeLayout - LayoutTraits - SideBySide - box position
Reply #1 - Feb 3rd, 2014 at 10:12am
Print Post  
Hi,

Assuming all children are set as assistants, and there are no invisible links or ones with IgnoreLayout enabled, you can infer that from the parity of the index of child's incoming link inside parent's OutgoingLinks collection:

bool left = parent.OutgoingLinks.IndexOf(child.IncomingLinks[0]) % 2 == 0;

I.e. TreeLayout places the first link's target (index 0) on the left, the next one on the right, left again, right again, etc.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint