Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Can't move node (Read 3618 times)
lenix
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 31
Joined: Apr 6th, 2011
Can't move node
Jun 20th, 2011 at 10:06am
Print Post  
Hello,

After I draw my diagram I try to move some nodes around by using the mouse and the move handle.
But only 1 node in my diagram is able to move, all others return to their original positions after trying to move them.

What could prevent a node from being moved?
Note that the node is not locked because I get the handles, it just goes back to original position after moving it.

Thanks in advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Can't move node
Reply #1 - Jun 20th, 2011 at 10:21am
Print Post  
Hi,

This could happen if you move a node outside the Diagram.Bounds rectangle. Try calling ResizeToFitItems after building the diagram, assign a large rectangle to Bounds, or set the AutoResize property.

If none of the above helps, check the NodeModifying handler; nodes will return to their original position if the handler sets e .Cancel = true.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
lenix
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 31
Joined: Apr 6th, 2011
Re: Can't move node
Reply #2 - Jun 20th, 2011 at 1:05pm
Print Post  
Thanks for the help.
I tried your suggestions and I wasn't lucky because the problem seems to be not related to moving outside the bounds of the diagram.

I noticed something though when I registered to the NodeModifying event.  The event gets called when I try to move the nodes that are able to move freely.
But the event doesn't get called when I try to move another node ( the ones that can't be moved ).
It's like the stuck nodes aren't really nodes.

To be more clear on the problem: The mouse cursor turns to "not allowed" when I drag drop one of the immovable nodes ( and the node actually moves until i release the mouse button, then it goes back to original position ).

Any ideas?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Can't move node
Reply #3 - Jun 20th, 2011 at 1:52pm
Print Post  
How many nodes are there in the Diagram.Nodes collection? Is there any difference between how you are creating the moveable and immovable nodes?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Can't move node
Reply #4 - Jun 20th, 2011 at 3:04pm
Print Post  
I now recall a similar problem happening if you programmatically create nodes smaller than Diagram.MinimumNodeSize. If the immovable nodes are very small, try either making them larger or set MinimumNodeSize to a smaller value.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
lenix
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 31
Joined: Apr 6th, 2011
Re: Can't move node
Reply #5 - Jun 21st, 2011 at 8:03am
Print Post  
Thanks Stoyo, it was the MinimumNodeSize.
I did diagram.MinimumNodeSize = new SizeF(1,1);
and now everything is running great.

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