Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic locking link.OriginAnchor (Read 1564 times)
pwdparis
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 15
Joined: Jan 18th, 2010
locking link.OriginAnchor
Mar 16th, 2010 at 6:36pm
Print Post  
Dear Sir/Madam,

We create a link using diagram.Factory.CreateDiagramLink(OriginPoint, EndPoint), then add some properties:

Link.Origin = [DiagramNode];
[DiagramNode].OutgoingLinks.Add(Link);
Link.Tag = true;
Link.AutoRoute = true;
Link.CascadeOrientation = MindFusion.Diagramming.Silverlight.Orientation.Horizontal;

The origin node ([DiagramNode] in the example above) has its anchor pattern set to :

event1.AnchorPattern = MindFusion.Diagramming.Silverlight.AnchorPattern.LeftInRightOut;

However, I can still pick up the link I just created and move the link so that its origin is any other node on the diagram. I can also move the link so that its anchor point changes from the right-hand side to the left-hand side of the node, despite the fact that the node's anchor pattern would appear not to allow this.

While I want to allow our users to move the end point of the link to any node on the diagram, I want to "lock" the origin so that the user can neither move the link to a different origin node nor move the link so that its origin anchor point is on the left hand side of the node.

All help, thoughts, etc. appreciated.

Thanks,

Mark
Goolara, LLC
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: locking link.OriginAnchor
Reply #1 - Mar 16th, 2010 at 7:07pm
Print Post  
Hi,

Try calling e.CancelDrag() from the LinkModifying handler if e.ChangingOrigin is set to true.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint