Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issue with GetNodeAt (Read 1927 times)
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
Issue with GetNodeAt
Dec 16th, 2010 at 5:02am
Print Post  
Hi Im using GetNodeAt method, but it doesn't give me what I want..

When the mouse position is at (1383, 445), the bound of the node is (1667,1413,230,690). The point and rect has no intersections but Im actully clicking on the right node.

Is there anything I did wrong? How can I make it work properly?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issue with GetNodeAt
Reply #1 - Dec 16th, 2010 at 6:31am
Print Post  
How are you getting the (1383, 445) point? You might have to convert it to diagram coordinates first, e.g. by calling e.GetPosition(diagram.DocumentPlane) if handling an event of the base Control class.
  
Back to top
 
IP Logged
 
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
Re: Issue with GetNodeAt
Reply #2 - Dec 16th, 2010 at 10:15pm
Print Post  
Thanks Stoyo.

I was using e.GetPosition(null) and I tried  e.GetPosition(diagram) as well.  Now trying your suggestion Smiley
  
Back to top
 
IP Logged
 
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
Re: Issue with GetNodeAt
Reply #3 - Dec 16th, 2010 at 11:42pm
Print Post  
Thanks Stoyo, this is just the solution I need.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint