Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Requires MousePosition relative to Diagram (Read 3169 times)
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Requires MousePosition relative to Diagram
May 9th, 2009 at 12:29pm
Print Post  
Hi,

I want to get mouse position with respect to the diagram when I clicked on the diagram.
Currently we are getting point from Point point = e.MousePosition; while diagram_Clicked.

Our diagram is inside a scroll viewer and we want mouse position relative to diagram not to the screen.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Requires MousePosition relative to Diagram
Reply #1 - May 10th, 2009 at 9:23am
Print Post  
In Diagram.Clicked handler e.MousePosition already gives you the mouse position with respect to the diagram.
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Requires MousePosition relative to Diagram
Reply #2 - May 11th, 2009 at 5:25am
Print Post  
Hi Stoyo,

Thanks for the reply, but the mouse position we are getting on diagram clicked comes out to be negative values but when we create a node at same position and on node created if we see its bounds say TopLeft the x,y position is different and we want the node created one x,y position.

please suggest something on this.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Requires MousePosition relative to Diagram
Reply #3 - May 11th, 2009 at 8:22am
Print Post  
Please email your test project showing this to support@mindfusion.eu.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Requires MousePosition relative to Diagram
Reply #4 - May 12th, 2009 at 1:52pm
Print Post  
In your email you say Quote:
1. First draw a Shape just by sketching,it will show a Message Box for x
and y position
but this does not happen. I replaced the Debug.WriteLine("node created") line in the NodeCreated handler with Debug.WriteLine(e1.Node.Bounds.TopLeft.ToString()), and then the coordinates shown when I click near the top left corner of the node are the same as the ones shown from NodeCreated. Btw in the messagebox you print a hyphen between the (x,y) string and the coordinates, maybe that's why you think they are negative?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint