Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Require custom handle (Read 6657 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Require custom handle
Reply #15 - Oct 21st, 2009 at 12:17pm
Print Post  
Calling CancelDrag from NodeStartModifying stops both move and resize operations. If you need to stop only move operations, check if (e.AdjustmentHandle == AdjustmentHandles.Move).
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Require custom handle
Reply #16 - Oct 22nd, 2009 at 7:27am
Print Post  
Thanks Stoyan, Its working Smiley
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Require custom handle
Reply #17 - Dec 7th, 2009 at 10:20am
Print Post  
Hi Stoyan,

In diagram_PreviewMouseDown event I want to select the node if mouse is over the node. This is working fine for me except in the case when I try to resize the node.

When I resize the node, I get node= null in diagram_PreviewMouseDown event.

Please suggest how I can get node in this event during resize.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Require custom handle
Reply #18 - Dec 7th, 2009 at 12:34pm
Print Post  
Hi Anshul,

The resize handles might stick a bit outside of the node boundaries, and GetNodeAt disregards adjustment handles, so seeing the mouse cursor change to the resize icon does not mean GetNodeAt will return the node at that position. Instead, use the GetNodeAt overload that takes a threshold argument, and optionally call  HitTestHandle.

Aren't nodes selected automatically when you grab the handle to resize them anyway?

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


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Require custom handle
Reply #19 - Dec 8th, 2009 at 10:24am
Print Post  
Hi Stoyan,

We have tried with threshold value but it has not solved our problem. We need to change Threshold value according to zoomfactor than only it works. exa:
If we give threshold value 3, it works fine for zoomfactor 50 but not works for zoomfactor 80. Apart from that if two nodes have approx similar bounds than in that case we may get wrong node using GetNodeAt(point,threshold).

Please suggest how to overcome these issues.

Regards,
Anshul
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint