Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Link is broken at times while moving nodes. (Read 5358 times)
beetee
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Location: Switzerland
Joined: Jul 13th, 2017
Link is broken at times while moving nodes.
Jul 25th, 2017 at 11:42am
Print Post  
Hello,

Refer the attached image.
It is observed that some times the  link is broken while moving the nodes. In the attached image there is a link between the red circles but it is not visible.

Please help.

Thanks
BT
  

2017-07-25_13-23-22.png ( 10 KB | 119 Downloads )
2017-07-25_13-23-22.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Link is broken at times while moving nodes.
Reply #1 - Jul 25th, 2017 at 1:02pm
Print Post  
Hi,

Are the red circles themselves nodes without a fill?

Regards,
Slavcho
  
Back to top
 
IP Logged
 
beetee
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Location: Switzerland
Joined: Jul 13th, 2017
Re: Link is broken at times while moving nodes.
Reply #2 - Jul 25th, 2017 at 1:14pm
Print Post  
Hello Slavcho,

Red circles are not nodes. This was added in a picture editor after taking the screen shot to indicate that the link is broken between these red circles.

Thanks,
BT
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Link is broken at times while moving nodes.
Reply #3 - Jul 25th, 2017 at 1:42pm
Print Post  
Are there transparent / invisible nodes under these circles?
  
Back to top
 
IP Logged
 
beetee
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Location: Switzerland
Joined: Jul 13th, 2017
Re: Link is broken at times while moving nodes.
Reply #4 - Jul 26th, 2017 at 7:57am
Print Post  
Hello Slavcho,

No. There are no transparent / invisible nodes.
When the link is broken, it is observed that the broken point at the link and connection point on the node are always on a same horizontal line as shown in the attachment.

Debug shows StartPoint of the link as the point where it is broken (point inside red circle on the link)

Thanks,
Bejoy
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Link is broken at times while moving nodes.
Reply #5 - Jul 26th, 2017 at 8:36am
Print Post  
Hi Bejoy,

What does the left circle represent? Mouse position while moving link's control point, and not a node being moved? Please attach a saved diagram xml file.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Link is broken at times while moving nodes.
Reply #6 - Jul 26th, 2017 at 9:04am
Print Post  
or do you mean you are moving the waving-robot kind of shape and the right circle shows where the link point should appear, but it appears at the left circle instead?
  
Back to top
 
IP Logged
 
beetee
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Location: Switzerland
Joined: Jul 13th, 2017
Re: Link is broken at times while moving nodes.
Reply #7 - Jul 26th, 2017 at 12:52pm
Print Post  
Hello,

Refer the attached document for the detailed scenario to reproduce the issue.

I could not generate the Diagrm XML because of the following exception.

System.Runtime.Serialization.SerializationException: 'Type 'System.Windows.DataTemplate' in Assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.'

Can you provide some sample code for serializing?

Thank you,
BT
  

BrokenLinkIssue.docx ( 55 KB | 116 Downloads )
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Link is broken at times while moving nodes.
Reply #8 - Jul 26th, 2017 at 2:11pm
Print Post  
Hi,

Does that message come from SaveToXml method, and you store templates as Tag value of nodes? If so, please post the Xaml for the template instead.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
beetee
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Location: Switzerland
Joined: Jul 13th, 2017
Re: Link is broken at times while moving nodes.
Reply #9 - Jul 27th, 2017 at 8:20am
Print Post  
Hello

Yes the exception was from SaveToXml method.

Meanwhile I have observed that RoutingOptions.GridSize has some impact on this.

When I set RoutingOptions.GridSize = 0, I could not reproduce this issue of broken link. But the orientation of the link near the node is not good in this scenario. I did not get exactly how RoutingOptions.GridSize property is affect link orientation near grid. Is it possible to adjust the orientation of the link near the node always vertical to the side of the node?

It is also observed that link is broken when the node moved using mouse. This is not seen when a node is moved by changing its location and not using mouse.

Thanks
BT

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Link is broken at times while moving nodes.
Reply #10 - Jul 27th, 2017 at 8:45am
Print Post  
Hi,

Are you using GridRouter instance as Diagram.LinkRouter? Only it should be affected by GridSize, and also should crash if the size is 0. Please post your routing properties' initialization code and node template xaml, or attach a test project containing them.

I think some part of the routing code looks for a point on node's border in direction of opposite node, and it might be failing with the open shape you are using. Anchor points should override that though, do the blue rectangles from your image indicate anchor points? If yes, do you have the RoutingOptions.Anchoring property set to Keep or Reassign?

Regards,
Slavcho
  
Back to top
 
IP Logged
 
beetee
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Location: Switzerland
Joined: Jul 13th, 2017
Re: Link is broken at times while moving nodes.
Reply #11 - Jul 27th, 2017 at 1:21pm
Print Post  
Diagram settings are as below

         var gridHeight = 16;
         var gridWidth = 16;
         var routingGridSize = 8;
         byte routingTurnCost = 160;
         byte routingCrossingcosts = 5;
         var autoAlginNodes = true;
         var snapToGrid = true;
         var showGrid = true;
         byte nodeVicinityCost = 8;
         double nodeVicinitySize = 12;
         double autoAlignDistance = 32;

         LinkRouter = new GridRouter();
         RoutingOptions.Anchoring = Anchoring.Keep;
         HitTestPriority = HitTestPriority.ZOrder;
         BackBrush = Brushes.Transparent;
         SnapToAnchor = SnapToAnchor.OnCreateOrModify;
         ShowAnchors = ShowAnchors.Auto;
         RouteLinks = true;
         AllowSelfLoops = false;
         Behavior = Behavior.DrawLinks;
         AllowSplitLinks = false;
         AlignToGrid = true;
         LinkShape = LinkShape.Cascading;
         AutoSnapLinks = true;
         AutoSnapDistance = 10;
         LinkHitDistance = 3;
         MergeThreshold = 5;
         DelKeyAction = DelKeyAction.None;
         MinimumNodeSize = new Size(2, 2);
         ShowDisabledHandles = false;
         AllowUnanchoredLinks = false;
         Selection.AllowMultipleSelection = true;
         Selection.IncludeItemsIfIntersect = false;

         ModificationStart = ModificationStart.SelectedOnly;
         SelectionOnTop = false;

         AutoResize = AutoResize.None;
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Link is broken at times while moving nodes.
Reply #12 - Jul 27th, 2017 at 8:20pm
Print Post  
Is ConnectionPointLayer you've emailed me a user control used as a node? It doesn't show any drawing code, but I've created one with similar shape in attached test project. I could not reproduce the link problem though - please check if it happens on your side. If it doesn't, try copying any link properties or event handlers that might be related from your main project until that starts happenning.

Regards,
Slavcho
  

BrokenLink.zip ( 10 KB | 182 Downloads )
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint