Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem with Hierarchical Layout (Read 1093 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Problem with Hierarchical Layout
Nov 18th, 2009 at 3:06pm
Print Post  
Hi Stoyan,

I am having set of nodes in the diagram with links between them.

Consider the node names to be 1,2,3

Links Between:1 -> 2
                      2 -> 3
                      1 -> 3

Now I select Hierarchical layout.

After that links 1->3 hides behind 1->2 and 2->3.

It should not hide, should be managed such that link can be easily seen/identified.

I am sending you the images regarding this on your Support ID.

Following is the code for Getting Hierarchical Layout.

public void ArrangeMapLayout(ArrangeLayout layout)
       {
           try
           {
               switch (layout)
               {
                   case ArrangeLayout.Compact:
                       GridLayout gridLayout = new GridLayout();
                       gridLayout.GridSize = gridLayoutSize;
                       gridLayout.KeepGroupLayout = true;
                       gridLayout.LayoutNode = LayoutNodeHandler;

                       //Included to prevent multiple layout arrangements
                       //specify any positive value other then 0 for RandomSeed
                       gridLayout.RandomSeed = 10;
                       gridLayout.Arrange(diagram);

                       //To reset link's SegmentCount and Style.
                       foreach (DiagramLink link in diagram.Links)
                       {
                           link.SegmentCount = 1;
                           link.Style = LinkStyle.Polyline;
                       }

                       ArrangeMap();
                       break;
                   case ArrangeLayout.Hierarchical:
                       LayeredLayout layeredLayout = new LayeredLayout();
                       //layeredLayout.LinkType = LayeredLayoutLinkType.Cascading;
                       //layeredLayout.Orientation = MindFusion.Diagramming.Wpf.Layout.Orientation.;
                       layeredLayout.KeepGroupLayout = true;
                       layeredLayout.LayoutNode = LayoutNodeHandler;
                       layeredLayout.Direction = Direction.Straight;
                       layeredLayout.Arrange(diagram);

                       //To reset link's SegmentCount and Style.
                       foreach (DiagramLink link in diagram.Links)
                       {
                           link.SegmentCount = 1;
                           link.Style = LinkStyle.Polyline;
                       }

                       ArrangeMap();
                       break;
               }
           }
           catch (Exception ex)
           {
               Debug.WriteLine("Exception in TopologyViewControl.ArrangeMapLayout : " + ex.Message);
           }
       }


Regards,
Anshul

           

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with Hierarchical Layout
Reply #1 - Nov 18th, 2009 at 6:21pm
Print Post  
Do not assign these values after the layeredLayout.Arrange call and the links will be easy to see:

link.SegmentCount = 1;
link.Style = LinkStyle.Polyline;
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint