Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Guidance on node placement/linking (Read 17536 times)
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Guidance on node placement/linking
Reply #15 - Sep 10th, 2009 at 8:47am
Print Post  
Also...

I specify a nodeDistance of 20f to SpringLayout, so why is there still overlap of the big nodes? (doesn't matter how many times I run it).

My naive view is that any nodeDistance >= 0 should mean no overlap of nodes?

(same overlap occurs when I make some of the circles in the Spring layout Demo diagram very large)







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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Guidance on node placement/linking
Reply #16 - Sep 10th, 2009 at 10:20am
Print Post  
Regarding the layout not working with TreeViewNodes, I've added the following to the test project's Form constructor and it seemed to arrange the nodes initially. The Layout! menu command worked too. Coudl you check what happens if you add it to your proper app?

Code
Select All
Random r = new Random();
for (int i = 0; i < 10; ++i)
{
	TreeViewNode node = new TreeViewNode(diagram1);
	node.ConnectionStyle = TreeViewConnectionStyle.Node;
	node.Bounds = new RectangleF(r.Next(200), r.Next(200), 30, 50);
	diagram1.Nodes.Add(node);

	if (i > 0)
		diagram1.Factory.CreateDiagramLink(diagram1.Nodes[i], diagram1.Nodes[i - 1]);
}

SpringLayout sl = new SpringLayout();
sl.IterationCount *= 8;
sl.RepulsionFactor *= 2;
sl.Arrange(diagram1);
 

  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Guidance on node placement/linking
Reply #17 - Sep 10th, 2009 at 10:42am
Print Post  
That works fine, but reverting back to my TreeViewNode derived TableNode still has the same problem.

There is an issue with the SpringLayout, it doesn't do anything until after I have physically moved a node.  This when I programatically add a new node each time a node is clicked.

I'll do some more playing and pin point the exact scenarios that do/don't work.

In regards to the nodeDistance query, I'm inclined to ask if could we have a MIN and a MAX nodeDistance, that way small nodes could be close to the parent, and larger ones pushed out.

This would better cater for nodes of various sizes.

Thanks for prompt responses.


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Guidance on node placement/linking
Reply #18 - Sep 10th, 2009 at 11:19am
Print Post  
Are you setting the IgnoreLayout property anywhere in the proper app?
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Guidance on node placement/linking
Reply #19 - Sep 10th, 2009 at 11:22am
Print Post  
Nope.

Will get back to you in a couple of hours with my extensive/exhaustive test results.

Cheers,
Tim
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Guidance on node placement/linking
Reply #20 - Sep 10th, 2009 at 12:01pm
Print Post  
Wow, I'm a bit of a retard.

I had the incoming parameter on the TreeViewConnectionPoint constructor the wrong way round for Origin and Destination.

Sorry to waste your time, don't know how that happened as I pretty much copied your code sample.

I'll post my requests/suggestions in the appropriate forum and then we can all move on..
Tim Tongue
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Guidance on node placement/linking
Reply #21 - Sep 10th, 2009 at 12:34pm
Print Post  
ok, then we can go ahead and release v5.3.2 now 8)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint