Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Automated layout forgetting link anchor IDs (Read 1506 times)
Kim Lillås
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Aug 18th, 2016
Automated layout forgetting link anchor IDs
Oct 5th, 2017 at 4:29pm
Print Post  
Hi,

I am trying out some automated layout for the first time.

I have a set of nodes and links.

I want them to layout without changing the existing anchor selections.

However, after the layout is done, the Link.DestinationAnchor and OriginAnchor is set to -1, and visually the links no longer tie to the original anchor points.

The assignment of -1 happens during the automated layout operation. I assumed that the layout.Anchoring = Anchroing.Keep setting would force the layout to keep the link anchors?

Code
Select All
         var layout = new MindFusion.Diagramming.Wpf.Layout.DecisionLayout();
         layout.Anchoring = Anchoring.Keep;
         layout.GrowToFit = true;
         var diagramItemCollection = new DiagramItemCollection();
         foreach (var diagramItem in MindfusionDiagram.Items.Where(x => x.GetType() != typeof(NestedDiagram)))
         {
            diagramItemCollection.Add(diagramItem);
         }

         layout.Arrange(MindfusionDiagram, diagramItemCollection); 

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Automated layout forgetting link anchor IDs
Reply #1 - Oct 6th, 2017 at 3:53pm
Print Post  
Hi,

This build should keep them -
https://mindfusion.eu/_beta/wpfdiag_anckeep.zip

Node positions are not affected by anchor points though, the layout class aligns links to points only as a post-processing step at this time. So this could lead to links taking several U-turns to get from outgoing to incoming anchor points.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kim Lillås
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Aug 18th, 2016
Re: Automated layout forgetting link anchor IDs
Reply #2 - Oct 9th, 2017 at 6:27am
Print Post  
Hello,

Thanks for the answer!

Greetings,
Kim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint