Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Swim Lane Shape Placement (Read 4234 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Swim Lane Shape Placement
Aug 9th, 2013 at 12:13am
Print Post  
Hi,

Have a look at the attached screenshot.
Can you tell me why the swim lane layout seems to place the shapes numbered 2.3, 2.4 and 2.5 in what I consider to be a desirable location, but 2.2 is placed to the extreme left of its swim lane.
Ideally, I'd like 2.2 vertically aligned with 2.3, but I was hoping the automatic layout would do that for me.

Any suggestions?

Thanks

Jim
  

Shape_Placement_In_Swim_Lane_-_08Aug2013.png (Attachment deleted)
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: Swim Lane Shape Placement
Reply #1 - Aug 14th, 2013 at 1:47pm
Print Post  
Me again,

Any update on this?
I realize that I could force alignment myself in code (you provided me with a technique to do this just recently), but I'd like the swimLayout.Arrange(diagram) to do as much of this for me as possible.

I'd like to understand why the first shape placed in a lane is not necessarily positioned to the left of that lane.

Thanks in advance for any guidance.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Swim Lane Shape Placement
Reply #2 - Aug 15th, 2013 at 5:44am
Print Post  
I am getting the following layout, check if you aren't moving the nodes later from some post-processing code.



Code
Select All
diagram.EnableLanes = true;
diagram.LaneGrid.RowCount = 4;

var n00 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n00.LayoutTraits[SwimlaneLayoutTraits.Lane] = 0;

var n01 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n01.LayoutTraits[SwimlaneLayoutTraits.Lane] = 0;

var n10 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n10.LayoutTraits[SwimlaneLayoutTraits.Lane] = 1;

var n11 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n11.LayoutTraits[SwimlaneLayoutTraits.Lane] = 1;

var n12 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n12.LayoutTraits[SwimlaneLayoutTraits.Lane] = 1;

var n20 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n20.LayoutTraits[SwimlaneLayoutTraits.Lane] = 2;

var n21 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n21.LayoutTraits[SwimlaneLayoutTraits.Lane] = 2;

var n30 = diagram.Factory.CreateShapeNode(0, 0, 20, 15);
n30.LayoutTraits[SwimlaneLayoutTraits.Lane] = 3;

diagram.Factory.CreateDiagramLink(n10, n11);
diagram.Factory.CreateDiagramLink(n11, n12);
diagram.Factory.CreateDiagramLink(n12, n00);
diagram.Factory.CreateDiagramLink(n00, n01);
diagram.Factory.CreateDiagramLink(n11, n30);
diagram.Factory.CreateDiagramLink(n12, n20);
diagram.Factory.CreateDiagramLink(n20, n21);

var l = new SwimlaneLayout();
l.CompactNodes = true;
l.Arrange(diagram); 

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