Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to keep link style after performing a layout (FC.NET)? (Read 1817 times)
Vladimir
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Feb 2nd, 2010
How to keep link style after performing a layout (FC.NET)?
Mar 17th, 2012 at 10:32pm
Print Post  
Hello!

I'm using FC.NET 5.6.4 Pro.
When I perform a layered layout, all links become polylines. But before layout there were all bezier and cascading. It make sense to me because link type has conceptual meaning in our application.
On the attached image I show you that transformation (from bezier to polyline).

I use that code to perform a layout:

var layout = new LayeredLayout();

// Common
layout.Anchoring = Anchoring.Reassign;
layout.KeepGroupLayout = true;
layout.NodeDistance = 60;
layout.MultipleGraphsPlacement = MultipleGraphsPlacement.MinimalArea;
layout.EnforceLinkFlow = true;
layout.StraightenLongLinks = false;

// LayeredLayout
layout.Orientation = Orientation.Vertical;
layout.SplitLayers = true;
layout.LayerDistance = 80;

layout.Arrange(diagram);

diagram.ResizeToFitItems(2, true);

My question is: how to keep links types while performing a layout?
  

Layout2.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to keep link style after performing a layout (FC.NET)?
Reply #1 - Mar 19th, 2012 at 8:25am
Print Post  
Hi,

All layout classes change the links style to one appropriate for the layout, and at this time there is no way to make them preserve the style. The only thing you can do is restore links' Style to its value before layout. E.g. collect all cascading links in a List<DiagramLink>, all Bezier links in another list, and set the respective Style for all links in the lists after calling Arrange.

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