Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Problem with RightClick on Node (Read 4044 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Problem with RightClick on Node
Apr 8th, 2009 at 1:36pm
Print Post  
Hi,

I have a custom node of type ShapeNode in which I am attaching a label at the bottom of the node.
When I RightClick on the node while continously pressing Left Butoon of the mouse,its behavior get changed.Node and that label does'nt move relatively.Label's get some upward position with respect to Node.Any body has any idea about this condition or can anybody tell me by which event I can solve this problem.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with RightClick on Node
Reply #1 - Apr 9th, 2009 at 8:49am
Print Post  
Hi,

Right-clicking while modifying a node cancels the operation and returns the node to its previous position. The attached node returns to its old position too from what I can see in my test. Are you doing something with the nodes in the group in response to some event?

Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with RightClick on Node
Reply #2 - Apr 9th, 2009 at 10:55am
Print Post  
Hi Stoyan,

Thanks for the reply. I am 100% agree with your point "Right-clicking while modifying a node cancels the operation and returns the node to its previous position".
But my question was that I have a custom node which is a combination of ShapeNode and Label.
when I apply same operation on the custom node,why the Label gets repel from the ShapeNode.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with RightClick on Node
Reply #3 - Apr 9th, 2009 at 12:27pm
Print Post  
By a custom node do you mean one derived from DiagramNode? Have you overridden the CancelModify method there?
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with RightClick on Node
Reply #4 - Apr 18th, 2009 at 9:00am
Print Post  
CancelModify method of what ?
I have not used.

I have a node in which I have attached one another node as child of this node.Now when I am moving this combined node and do RightClick while pressing LeftButton of the mouse; parent node gets its position back but child node does not.Child not does not return to its previous position.

I hope now you the clear idea about the problem.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with RightClick on Node
Reply #5 - Apr 20th, 2009 at 5:50am
Print Post  
No, I'm not. Here is my test project where right-click while dragging works as expected:
https://mindfusion.eu/_samples/TestGroup.zip

Please add to it the properties and event handlers from your application that would reproduce the problem and email the project to support@mindfusion.eu.

Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with RightClick on Node
Reply #6 - Apr 20th, 2009 at 3:58pm
Print Post  
Hi stoyan,

Please attach a label node(TextNode) at the bottem of this node and do the same operation again.You will see textNode get rippel from that parent node.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with RightClick on Node
Reply #7 - Apr 21st, 2009 at 9:24am
Print Post  
I've changed the handler to the following:

Code
Select All
diagram.Factory.CreateShapeNode(
	e.Node.Bounds.BottomRight, new Size(20, 20))
	.AttachTo(e.Node, AttachToNode.BottomRight);
 



Is that what you meant by attaching it to the bottom? It still worked as expected...

Stoyan
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Problem with RightClick on Node
Reply #8 - Apr 21st, 2009 at 4:21pm
Print Post  
I have sent a sample project to you.Please check that.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with RightClick on Node
Reply #9 - Apr 22nd, 2009 at 9:25am
Print Post  
You call diagram.Items.Remove(diagram.ActiveItem) from the Diagram.Clicked handler. So the node can't return to its old position, because it's not in the diagram anymore.
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Problem with RightClick on Node
Reply #10 - Apr 22nd, 2009 at 11:01am
Print Post  
yes,its working. Thanks Stoyan Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint