Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DragAndDrop on Round ShapeNode (Read 2972 times)
granit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Mar 1st, 2010
DragAndDrop on Round ShapeNode
May 11th, 2010 at 8:31am
Print Post  
Hello!
I have MindFusion.Diagrammimg lib for WinForms (PE).
For DragAndDrop I use GetNodeAt function.
When I make drop on RectangleNode - it's ok, it's working. But when on RoundNode - GetNodeAt returns null. I have to resize to increase this node, and only after that this function return proper node.
How can it be fixed?
Thanks!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DragAndDrop on Round ShapeNode
Reply #1 - May 11th, 2010 at 9:22am
Print Post  
Hi,

GetNodeAt works fine for me. Are you converting the drag-and-drop position from screen to view to diagram coordinates? e.g.

PointF point = diagramView.ClientToDoc(
    diagramView.PointToClient(new Point(e.X, e.Y)));

Stoyan
  
Back to top
 
IP Logged
 
granit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Mar 1st, 2010
Re: DragAndDrop on Round ShapeNode
Reply #2 - May 11th, 2010 at 9:35am
Print Post  
this code I use to find node:
Point p = this.PointToClient(new Point(e.X, e.Y));


PointF targetPt = diagramViewMain.ClientToDoc(p);


DiagramNode dn = diagramMain.GetNodeAt(targetPt, true, false);

-------------------------
Thanks, your code works good!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DragAndDrop on Round ShapeNode
Reply #3 - May 11th, 2010 at 10:31am
Print Post  
You were using the form's PointToClient method and it works now if using DiagramView.PointToClient?
  
Back to top
 
IP Logged
 
granit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Mar 1st, 2010
Re: DragAndDrop on Round ShapeNode
Reply #4 - May 11th, 2010 at 11:47am
Print Post  
Yes.
That code I took from your examples.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint