The shortest length of a line

I created an effect that automatically adds a node to a line by dragging it onto it
like this:
However, if the distance between two nodes is short, it will be crowded after dragging
So I wonder if there is a way to give the line a minimum length, lengthen the line after dragging in nodes, and change the position of other nodes when there are more nodes behind it

The length of the links depends on the positions of the nodes. If the user does not move the nodes manually and you do not move the nodes programmatically when splicing in that node, then it is normal to depend on an automatic layout. What have you set the Diagram.layout property to?