Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Overlapping links will cause the link text to disappear and sets strokeThickness to 1 (Read 2347 times)
Cyrinael
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 42
Joined: Jul 22nd, 2016
Overlapping links will cause the link text to disappear and sets strokeThickness to 1
Aug 11th, 2016 at 9:38am
Print Post  
Hi,

I have found a problem, where when two or more links completely overlap, the link text is not shown and the StrokeThickness is set to 1. The following code will show the problem:
Code
Select All
ShapeNode node1 = new ShapeNode() { Bounds = new Rect(10, 50, 20, 20) };
ShapeNode node2 = new ShapeNode() { Bounds = new Rect(80, 50, 20, 20) };
ShapeNode node3 = new ShapeNode() { Bounds = new Rect(150, 50, 20, 20) };

diagram.Nodes.Add(node1);
diagram.Nodes.Add(node2);
diagram.Nodes.Add(node3);

DiagramLink link1 = new DiagramLink(diagram, node1, node2);
link1.StrokeThickness = 5;
link1.Text = "Test";

DiagramLink link2 = new DiagramLink(diagram, node1, node3);
link2.StrokeThickness = 5;
link2.Text = "Test";

diagram.Links.Add(link1);
diagram.Links.Add(link2);
 



Maybe the removal of the text is intended, but the stroke thickness should not switch when the Links overlap in my opinion.

I attached the images of the result.

Best regards,

Cyrinael

  

Result.PNG ( 0 KB | 67 Downloads )
Result.PNG
AfterDrag.PNG ( 2 KB | 83 Downloads )
AfterDrag.PNG
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Overlapping links will cause the link text to disappear and sets strokeThickness to 1
Reply #1 - Aug 11th, 2016 at 10:52am
Print Post  
Hi,

It seems related to the links being horizontal rather than overlapping, because the same happens if you rearrange the arguments a bit -

DiagramLink link1 = new DiagramLink(diagram, node1, node2);
DiagramLink link2 = new DiagramLink(diagram, node2, node3);

I guess that's related to the bounding rectangle of link's UIElement having 1-pixel height originally, and this staying cached somewhere in diagram's or WPF code, leading to thicker line and text getting clipped. Our developer will investigate.

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


I Love MindFusion!

Posts: 42
Joined: Jul 22nd, 2016
Re: Overlapping links will cause the link text to disappear and sets strokeThickness to 1
Reply #2 - Aug 11th, 2016 at 11:42am
Print Post  
Hi Slavcho,

the same thing happens also with vertical aligned nodes

Best regards,

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


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Overlapping links will cause the link text to disappear and sets strokeThickness to 1
Reply #3 - Aug 11th, 2016 at 1:16pm
Print Post  
Hi Cyrinael,

This build should fix it -
https://mindfusion.eu/_beta/wpfdiag341.zip

Best regards,
Slavcho
  
Back to top
 
IP Logged
 
Cyrinael
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 42
Joined: Jul 22nd, 2016
Re: Overlapping links will cause the link text to disappear and sets strokeThickness to 1
Reply #4 - Aug 12th, 2016 at 6:08am
Print Post  
Hi Slavcho,

the strokeThickness is now correct. Thank you.

Best regards,

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