We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Custom link logic

Using v5.

As you can see from the screen shot of our custom symbols, the orthoganal links draw themselves right through parts of the symbols.

I need to have a link that will automatically draw so that it goes directly outside the symbol and then move appropriately to connect up.

Can you give me an idea of what my best approach would be to accomplish this?

Thanks,
Dan

Linking Issue.zip

4 Replies

RR Ramya R Syncfusion Team May 28, 2007 11:54 AM UTC


Hi Eric,

Thank you for your interest in Syncfusion Products.

A link is connector between two ports of a symbol. So the links by default get drawn sometimes over the symbol depending upon the position of the ports.

If your intention is to avoid the links getting dappearing over the symbol then is can be done by positioning the ports along the edges of a node as shown in the code snippet below,

rect1.CentralPort.Position = Position.TopCenter;

Let me know if I am wrong in getting your requirement.

Thanks & Regards,
Ramya.


RR Ramya R Syncfusion Team May 28, 2007 02:23 PM UTC

Hi Dan,

Sorry for addressing you with a different name.

A link is connector between two ports of a symbol. So the links by default get drawn sometimes over the symbol depending upon the position of the ports.

If your intention is to avoid the links from getting appeared over a symbol then is can be done by positioning the ports along the edges of a node as shown in the code snippet below,

rect1.CentralPort.Position = Position.TopCenter;

Let me know if I am wrong in getting your requirement.

Thanks & Regards,
Ramya.


DD Dan Dorey May 28, 2007 03:09 PM UTC

Ramya,

I think you have the requirement correct. However, I don't think moving the port to the extreme right is going to be good enough in this case. At best this would mean the lines are directly along the edges of the symbol. If the target symbol the link is connecting to is behind (i.e. the left side in my screen shot) then the link is going to run down the entire height of the symbol. I'd need the link to move out maybe 20 pixels to the right of the symbol before moving toward the target symbol. Let me know if I need to clarify that better.

Thanks,
Dan

>Hi Dan,

Sorry for addressing you with a different name.

A link is connector between two ports of a symbol. So the links by default get drawn sometimes over the symbol depending upon the position of the ports.

If your intention is to avoid the links from getting appeared over a symbol then is can be done by positioning the ports along the edges of a node as shown in the code snippet below,

rect1.CentralPort.Position = Position.TopCenter;

Let me know if I am wrong in getting your requirement.

Thanks & Regards,
Ramya.


RR Ramya R Syncfusion Team May 29, 2007 06:07 AM UTC

Hi Dan,

Thank you for the update.

In general the connectors drawn between the nodes depend on the position of the nodes.

The line segment of a connector cannot be moved or adjusted programmatically after establishing connections between the nodes since the connectors get drawn depending on the position of the nodes.

Though at the runtime the line segment of OrthogonalConnector can be adjusted by moving the control point of the connector but sometimes the line segment of the connectors continue to appear within the symbol depending on the position of the nodes.

So you can avoid the links from appearing within symbol by adjusting the X and Y position of the nodes.

Or by sending the links to the back of the nodes using the code snippet below,

this.diagram1.Model.SendToBack(link);

By sending the links to back, the part of the link which is not over the node only appears when the ouput is viewed.

Please let me know whether this helps you.

Thanks & Regards,
Ramya.

Loader.
Live Chat Icon For mobile
Up arrow icon