Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram.GetNodeAt() get lost when there is Zoom (Read 1661 times)
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Diagram.GetNodeAt() get lost when there is Zoom
Jan 28th, 2009 at 5:23pm
Print Post  
hi,

When you apply a ZoomFactor, the method Diagram.GetNodeAt() doesn't work properly, is there any workaround for this?

And besides after call Diagram.ResizeToFitItems() that method shows a erratic behavior too.

I want select nodes with the right click as well, I have a contextual menu, and when the user right click I want select that element and open the contextual menu.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.GetNodeAt() get lost when there is Zoo
Reply #1 - Jan 28th, 2009 at 5:51pm
Print Post  
Hi,

GetNodeAt expects diagram logical coordinates, which you should receive as an arguments if you handle the Diagram.Clicked or NodeClicked events. If you display a context menu from the MouseDown event, you receive device coordinates as derived from the Control class (though you can convert them to logical ones using the transform methods in Diagram).

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


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Diagram.GetNodeAt() get lost when there is Zoo
Reply #2 - Jan 28th, 2009 at 6:15pm
Print Post  
Much better now.

Thanks a lot.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint