Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link between shapenodes and repositioning (Read 2785 times)
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Link between shapenodes and repositioning
Jan 27th, 2010 at 2:54pm
Print Post  
Hi Stoyo

In my diagram there are few shape nodes and links (diagram links) between the shapes are available.

In the displayed diagram, I can re-position the node and similarly i can re-position the diagram links. While re-positioning the diagram links if i pick the anchor point of the line and positioned it anywhere in the diagram and release the mouse button, the orignal line is drawn again ( This is as per expected behaviour)

But if I pick the anchor point and set it to another node, link between another node gets created. In re-positiong the links anchor point, I don't want to allow changing source/destination of the link. The source and destination should be same as orignal and user should only able to change the placement on link pointers on source/destination node.

How to achive this ?

-Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between shapenodes and repositioning
Reply #1 - Jan 27th, 2010 at 3:45pm
Print Post  
Hi Rajesh,

Handle the LinkModifying event and check the args.ChangingOrigin / ChangingDestination properties. If they are enabled and also args.Node is different from the link's current origin / destination, set e.Cancel = true.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Link between shapenodes and repositioning
Reply #2 - Jan 28th, 2010 at 6:08am
Print Post  
Hi Stoyo

Thanks for the reply. Its working as expected now.

Here I facing one more issue -
For eq.
1.  If i pick the destination/source anchor point and start moving the mouse out side the node rectangle mouse cursor changes to "Hour Glass" cursor indicating that mouse position is not correct for setting the new anchor point fo destination/source.

2. When I move the mouse cursor over the shapes border line, mouse cursor changes "Arrow" indicating that setting new anchor point is correct.

This is as per expected.
3. Today I found that if i move the mouse cursor inside the node rectangle the mouse cursor remains in "Arrow" cusor and line anchor point moves accorss the border of shape but once I release the mouse, the anchor point gets sets to its original position.

In situation 2, I need to move the mouse cursor exactly on the border of shape to set new anchor position.
It would be nice, if I can set the anchor point in behavior 3 also. How I achive this?

-Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between shapenodes and repositioning
Reply #3 - Jan 28th, 2010 at 11:23am
Print Post  
Hi Rajesh,

Do you mean you need to set the link's end point to any point of the node's border, and not just ones from the AnchorPattern?

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


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Link between shapenodes and repositioning
Reply #4 - Jan 28th, 2010 at 2:35pm
Print Post  
Hi Stoyo

Ya. This is what I need.

-Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between shapenodes and repositioning
Reply #5 - Jan 29th, 2010 at 7:54am
Print Post  
Hi Rajesh,

For other platforms we have a SnapToAnchor property that controls whether links snap to node's anchor points only when initially created, or after every modification. Will this work for you? We can port it to Silverlight next week.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint