Old Diagram data allowed connection to Node Leaving orphaned connectors when connection only allowed to Port

I have old diagrams that are rendered via Json and allow connections to Nodes directly. After updating my code and only allowing connector connections to Ports my older diagrams have connectors that are left disconnected. Is there a way to have my connectors automatically connect to the nearest port?


4 Replies

MG Moulidharan Gopalakrishnan Syncfusion Team March 19, 2024 09:12 AM UTC

Hi,
We're currently unclear about your specific requirement. Our Diagram smoothly handles the loading of JSON data, and interactions are managed seamlessly. Could you kindly provide the JSON data you've been using, along with the procedure to replicate the issue? or a sample. Additionally, please share the package version in which you have saved your diagram and the package version in which you are loading a diagram.

Regards,
Moulidharan



ES exxon suarez March 19, 2024 10:47 PM UTC

port_connection_1.pngport_connections_2.png
I have attached images of my diagram. I added:
~NodeConstraints.InConnect & ~NodeConstraints.OutConnect
to my NODES and now only allow connectors to the PORTS and now my old JSON diagrams load with connectors close to my NODES but they are NOT connected to any PORTS. Can i set the connectors to automatically connect to the nearest PORT?



ES exxon suarez March 19, 2024 10:48 PM UTC

I am using syncfusion angular diagram 24.2.5



MG Moulidharan Gopalakrishnan Syncfusion Team March 20, 2024 01:13 PM UTC

Hi,

When attempting to save and load older diagrams where connectors are linked directly to nodes, and when transitioning to a new diagram format where node connections are being prevented and connectors are expected to be linked to ports is not possible. There is no support for automatic reassignment of connectors to ports if such connections were not predefined during the initialisation of nodes and connectors. Before loading a diagram, you should set a port-to-port connection for nodes and then load a diagram.


Regards,
Moulidharan


Loader.
Up arrow icon