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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to cause connectors to automatically re-route around nodes dropped i their way

Thread ID:

Created:

Updated:

Platform:

Replies:

142282 Jan 24,2019 09:55 PM UTC Jan 28,2019 04:27 AM UTC JavaScript 1
loading
Tags: ejDiagram
Jim Jacobs
Asked On January 24, 2019 09:55 PM UTC

Hi,

In researching your release notes recently, I came across the following:

#125463, 125593, 133145, 126648, 142340, 147493, 157092, 167300, 172181, 176433, 178583 - Support to automatically re-route the line around the nodes if any nodes is found in between line is added

Does this feature address the following scenario:




In case 2 above, I moved Task 3 between the other 2 tasks - the connector did not re-route.
In case 3 I manually re-routed the connector.

Is it possible to have case 3 happen automatically?
I was hoping that is what the feature I found did.

Any suggestions?

Thanks

Jim

Aravind Ravi [Syncfusion]
Replied On January 28, 2019 04:27 AM UTC

Hi Jim 
 
By using routing constraints in diagram we can able to do  Line routing for nodes. Please find the below code snippet for how to use the routing constraints.  
 
                     
              $("#diagram").ejDiagram({ 
                    nodes: nodes, 
                    width: "100%", 
                    height: "100%", 
                    enableAutoScroll: false, 
              constraints: ej.datavisualization.Diagram.DiagramConstraints.Default | ej.datavisualization.Diagram.DiagramConstraints.Routing 
                     
                }); 
                     
                 
 
 
 
We have created a simple sample for your requirement . Please find the sample in below playground link 
 
 
For more information about diagram constraints please find below UG documentation link  
 
 
If you want routing for only specified connector instead of whole diagram means then you can define routing for only specified connector through connector constraints. Please find below code snippet for how to enable routing for specified connector. 
 
            var connector = { 
                name: "connector1", 
                sourcePoint: { x: 100, y: 100 }, 
                targetPoint: { x: 200, y: 200 }, 
                constraints:                                         ej.datavisualization.Diagram.ConnectorConstraints.Default | ej.datavisualization.Diagram.ConnectorConstraints.Routing 
              }; 
 
 
 
For more information about  connector constraints please find below UG documentation link  
 
 
Note: Routing does not support for the nodes inside the swimlane 
 
Regards 
Aravind Ravi 
 
 
 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;