Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem with Flowlayout Arrange (Read 2975 times)
kai-uwe.zoland
YaBB Newbies
*
Offline



Posts: 18
Joined: Sep 5th, 2008
Problem with Flowlayout Arrange
Jan 8th, 2010 at 10:46am
Print Post  
I have a diagram using the grid as lanes for the flowlayout. Now I am trying to just arrange a selection of nodes in this diagram.
So I build a DiagramItemCollection of all nodes and links, that are relevant for this group, I want to arrange. This collection I use as input for the flowlayout Arrange method, that gets a DiagramItemCollection as input.

My problem now is, that after the arrange, all other nodes and links are moved below and to the right of the newly arranged selection. Also the grid lanes length is resized according to the arranged selection. As a result, half of the nodes, that I did not want to arrange, are moved outside the grid lanes.

I also tried to set the locked property of all nodes, that I do not want to be arranged and moved. But this also made no difference.

Always the selection is arranged fine and the rest of the nodes in the diagram is moved to new places.
My expectation is, that all the diagram items, that I do not put into the DiagramItemCollection, do not move or change in any way.

Do you have any advice? Or is this some bug?

Thanks for your help.

Kai-Uwe
  
Back to top
WWWYIM  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with Flowlayout Arrange
Reply #1 - Jan 8th, 2010 at 1:40pm
Print Post  
Try setting ChangeLaneDimensions = false in this case. Our developer will check why the other items are moved. Meanwhile, what happens if you set IgnoreLayout = true for the rest of the items, instead of Locked?

Stoyan
  
Back to top
 
IP Logged
 
kai-uwe.zoland
YaBB Newbies
*
Offline



Posts: 18
Joined: Sep 5th, 2008
Re: Problem with Flowlayout Arrange
Reply #2 - Jan 8th, 2010 at 2:20pm
Print Post  
Did some small tests with IgnoreLayout

Case 1:

IgnoreLayout = true
ChangeLaneDimension = false
No complete Arrange at the beginning:

Lane Dimension is ok, IgnoreLayout Items are not arranged relativ to each other, meaning the positioning is the same as before. The complete group of the ignorelayout items is moved below the arranged group.

Case 2:

IgnoreLayout = true
ChangeLaneDimension = false
Complete Arrange of the diagram at the beginning, set ignorelayout = true for group of items, call arrange for ItemCollection, that has ignorelayout = false.

The arrange of the Itemcollection just changes the position of the items in the itemcollection a little, everything else stays in its place.

Case 3:

IgnoreLayout = false for all items
ChangeLaneDimension = false
No complete Arrange at the beginning:

Lane Dimension is ok, position to each other of all the items are arranged. Items, that were not in the ItemCollection for the arrange, were moved below the group, that was arranged using the itemcollection.

Case 4:

IgnoreLayout = false for all items
ChangeLaneDimension = false
Complete Arrange of the diagram at the beginning:

Same result as case 2. The arrange of the Itemcollection just changes the position of the items in the itemcollection a little, everything else stays in its place.


So IgnoreLayout has some impact, if the items outside the itemcollection are repositioned, but they are still moved. And if I do a complete arrange of the diagram at the beginning, this behaviour changes completly.


By the way, the idea for my application is, that I arrange several subgraphs with the flowlayout algorythm and afterwards move and position these complete and arranged subgraphs as a groups.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with Flowlayout Arrange
Reply #3 - Jan 11th, 2010 at 10:02am
Print Post  
Try also setting RecreateGraph = true, otherwise some feature for incremental arrangement might also affects the other nodes. Our developer said a sample project she sent you last year shows how to arrange only the selection, check the cntxt_menuArrangeGroupSelected_Click handler in that example. If that still does not work, check if there are rules for all nodes in the selected sequence.

Stoyan
  
Back to top
 
IP Logged
 
kai-uwe.zoland
YaBB Newbies
*
Offline



Posts: 18
Joined: Sep 5th, 2008
Re: Problem with Flowlayout Arrange
Reply #4 - Jan 12th, 2010 at 8:59am
Print Post  
With RecreateGraph = true and using groups my testcases now work. Thanks for your help.

Kai-Uwe
  
Back to top
WWWYIM  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint