How can i Auto-Layout the nodes but lock their position for any new connection i make?

Hello, 

I'm trying to create an Hierarchical layout of all the nodes and connections i made. After i create it (using diagram's auto-layout) i want to add (uppon user request) connections between the nodes. That said, i want the structure of the tree to remain the same (so, any new connection will either overlap or go around/between the nodes).

I already tried to get the offset of the nodes, null the layout manager, reset the offset of the nodes and then add the new connections. It didn't worked (offset position of the nodes seemed to be 0,0 - even after layout manager positioned them right, at first)

Is there any way to achieve that?

Thank you in advance.

ps: Here's an image of my code-snippet


1 Reply 1 reply marked as answer

RA Ranjitha Amirthalingam Syncfusion Team September 14, 2020 01:48 PM UTC

Hi Andreas, 
 
We suspect that your requirement is to restrict the layout update while interact the layout at runtime. By default, Layout will not update for every interaction. We have provided video and sample to represent this. Please refer to them as below. 
 
 
 
In this video, we have added a new connection through button click. Node position is not changed and layout is not updated for the new connection. 
 
 
 
If the scenario mentioned in the video is different from the reported scenario, please provide us detailed explanation like video replicating the issue. 
 
Regards, 
Ranjitha A. 



Marked as answer
Loader.
Up arrow icon