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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hard to connect on right port

Thread ID:

Created:

Updated:

Platform:

Replies:

148633 Oct 28,2019 08:10 PM UTC Nov 6,2019 04:03 PM UTC React - EJ 2 3
loading
Tags: Diagram
peter
Asked On October 28, 2019 08:10 PM UTC

Hello,


When the diagram is not zoomed enough, it is pretty hard to connect connectors. 

On the above example, each node has 16 ports. When one tries to change the connector target position to one of the 16 ports of one of the small box nodes, the connector seems to always want to connect to the top middle port of the big blue node. 

The target of the connector need to be exactly at the perfect pixel of the port to connect to it which is annoying. 

Is it possible to change the magnetism of the port so that the target of the connector connects to it if it is at say 5 pixels from it?

Thank you, 

Shyam G [Syncfusion]
Replied On October 29, 2019 05:32 AM UTC

Hi Peter, 

When we move the connector to the node for establishing connection, it will dock to the node center. If you need to connect to a port, then you should move connector exactly to the port. It is a default behavior of the diagram control. We don’t have option to establish the connection with nearest ports in nodes, while drawing the connector at runtime. 
Also, when you need only port to port connection and to disable node to node connection, please remove InConnect and OutConnect constraints from default NodeConstraints. Please refer to a code example and modified sample. 

Code example: 
const loadDiagram = () => {  
    console.log("save is", save)  
     // iterate the nodes 
    for(let i=0; i< save.nodes.length; i++) { 
      let node = save.nodes[i]; 
      // remove the connect constraints 
      node.constraints = NodeConstraints.Default &~(NodeConstraints.InConnect | NodeConstraints.OutConnect); 
    }  
    save = JSON.stringify(save) 
    diagramInstance.loadDiagram(save) 
 



Please let us know whether an above solution satisfies your requirement?  

Regards, 
Shyam G 


peter
Replied On November 5, 2019 05:29 PM UTC

Ok, 

I am making a software that watches to what node a port is connected so if it is not well connected, the software will fail.

It would be very nice to implement a system to automatically connect to port if it is at a certain distance because it can be hard for a user to connect to a port.

At the moment, the only way to check if the connector is well conneted is to see if the end of the connector is white and not red which is not convenient.

Shyam G [Syncfusion]
Replied On November 6, 2019 04:03 PM UTC

Hi Peter,  
We don’t have support to establish the connection with nearest node ports, while drawing the connector at runtime. We have logged “Need to provide support to establish the connection with nearest nodes, while drawing the connector at runtime” as a feature and you can track the status of the feature from the below link. 
Feedback link: 
 
Regards, 
Shyam G 


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

Live Chat Icon For mobile
Live Chat Icon