Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Dragging links (Read 17874 times)
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #30 - Jan 6th, 2010 at 2:47pm
Print Post  
Thanks!
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #31 - Jan 11th, 2010 at 8:29am
Print Post  
I found very distressing effect of working Diagram.GetLinkAt. It doesn't find the necassary link. But instead it finds the another link. I send you the screenshot of the diagram. Look at the right decision node. When the mouse is over the top link the GetLinkAt returns the bottom link. How can I avoid this effect?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dragging links
Reply #32 - Jan 11th, 2010 at 9:30am
Print Post  
Try setting LinkHitDistance to some small value, e.g. two points. GetLinkAt returns the first link it finds within that distance.
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #33 - Jan 11th, 2010 at 9:33am
Print Post  
There is no effect. It was:
Code
Select All
var link = Diagram.GetLinkAt(point, 3, true, ref segment);
 


I try to set:
Code
Select All
var link = Diagram.GetLinkAt(point, 1, true, ref segment);
 


  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #34 - Jan 11th, 2010 at 9:40am
Print Post  
I note that it takes place in case when the ended contol points of the links have overlapped coordinates. In my example the start point of the first link has coordinates {262,5;247,5}and the last point {612,5;382,5}.
The last control point of the second link has coordinates {612,5;322,5}
I see that the X-coordinates is equal and the Y-coordinate is between 247,5 and 382,5. In case like this tha same behavior takes place
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dragging links
Reply #35 - Jan 11th, 2010 at 9:55am
Print Post  
Does it select the wrong link if you click to select it? could you save the diagram to xml and email it so support@mindfusion.eu?

Thanks,
Stoyan
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #36 - Jan 11th, 2010 at 10:04am
Print Post  
It doesn't select wrong link because I overridden the behavior. But it tries to do it Smiley. I have to add my project to xml diagram because otherwise you can't deserialize it. I sent you an archive. File with diagram named as diagram.xml
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dragging links
Reply #37 - Jan 11th, 2010 at 11:42am
Print Post  
This should work better:
https://mindfusion.eu/_beta/wpfdiag_linkat.zip

You'll have to do a few modifications to your project to use the new assembly:

- replace ArrowHead with ArrowHeads in the InitLinks() method.
- the DrawHandles override (NodeRoutine.cs) now takes a HandlesVisualStyle argument instead of Color
- set the reference' "Use Specific Version" property to false

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



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #38 - Jan 11th, 2010 at 12:07pm
Print Post  
Thanks. It really works much better
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #39 - Jan 28th, 2010 at 7:04am
Print Post  
I found an interesting effect. It looks like a bug. The effect takes place after link.Route() call. I sent you the e-mail with video which demonstrate this effect. May be it is necessary to call something after route for this case?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dragging links
Reply #40 - Jan 28th, 2010 at 11:43am
Print Post  
Yes, it seems we missed this case (last two points coinciding) when we changed the arrowheads type to Shape. We'll upload a fix in a few days.

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



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dragging links
Reply #41 - Jan 28th, 2010 at 12:46pm
Print Post  
Thank you
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint