Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Center Text on a Diagram link (Read 3893 times)
donalmeida
Junior Member
**
Offline


Yay...

Posts: 65
Joined: Oct 6th, 2009
Center Text on a Diagram link
Oct 6th, 2009 at 6:42pm
Print Post  
How do I center the text on a (Diagram link). Right now the text is seen on the far right of the Link and is almost covering the Text of the destination node.
Thanks,
Don Almeida
  

Don Almeida.
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Center Text on a Diagram link
Reply #1 - Oct 7th, 2009 at 6:43am
Print Post  
It looks nicely centered in my test project. Are you using version 1.1? The text should be centered over the middle segment of the link if it has an odd number of segments, or otherwise centered over the middle control point if there are an even number of segments.

Stoyan
  
Back to top
 
IP Logged
 
donalmeida
Junior Member
**
Offline


Yay...

Posts: 65
Joined: Oct 6th, 2009
Re: Center Text on a Diagram link
Reply #2 - Oct 7th, 2009 at 3:36pm
Print Post  
I might have to admit I am new to these controls, so I am not aware of the term segments.
this is how I create a link:
DiagramLink link = new DiagramLink(diagram, fromNode, toNode)
{

Pen = new Pen(Brushes.Black),
Style = LinkStyle.Bezier,
Text = "Some Text",
};

diagram.Links.Add(link);

Do I need to set some other property to center the Text on the Link?
  

Don Almeida.
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Center Text on a Diagram link
Reply #3 - Oct 8th, 2009 at 7:31am
Print Post  
Ok, centering does not work for Bezier links indeed. We are releasing a new version in a few days and will fix this there.

Stoyan
  
Back to top
 
IP Logged
 
donalmeida
Junior Member
**
Offline


Yay...

Posts: 65
Joined: Oct 6th, 2009
Re: Center Text on a Diagram link
Reply #4 - Oct 8th, 2009 at 3:33pm
Print Post  
Thank you for fixing this....you guys are Awesome...
  

Don Almeida.
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Center Text on a Diagram link
Reply #5 - Oct 9th, 2009 at 7:48am
Print Post  
Hi,

Try this version:
https://mindfusion.eu/_beta/diaglite12_linkstyle.zip

The problem was that the link.Style setter added two new control points at the end of the link, and this the text was centered relatively to them. Now the new points are added at 1/3 and 2/3 of the link length and the text should appear centered correctly.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Piraet
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Nov 12th, 2009
Re: Center Text on a Diagram link
Reply #6 - Nov 17th, 2009 at 2:31pm
Print Post  
Is this also available for the ASP.NET version? It seems like I'm having the same problem. (text is over the arrow head, instead of center of link)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Center Text on a Diagram link
Reply #7 - Nov 17th, 2009 at 6:07pm
Print Post  
It's not available in the ASP.NET version yet. You might rebuild the ClientApp project with a reference to the Diagramlite V1.2 assembly to get a fixed .xap file.

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