Is there a suggested approach to optimize for a link length relative to the edges of the box of a node instead of the midpoint of the box?
So that the "outside-part" of the links in the below diagram would appear equal and not very different:
One approach that I thought of would be to try and have a highly dynamic linkLength fn which traverses the mutable tree (it's passed the link, which I think will have runtime pointers to the nodes?), and then offsets the linkLength dependant upon the current relative positions of the nodes (by subtracting the section of box that it's currently being drawn over, basically). Even if that's possible which I'm not sure of, it seems that it would likely break some assumptions of the algorithm because of the amount the ideal link length is changing as the line goes from vertical to horizontal.

Is there a suggested approach to optimize for a link length relative to the edges of the box of a node instead of the midpoint of the box?
So that the "outside-part" of the links in the below diagram would appear equal and not very different:
One approach that I thought of would be to try and have a highly dynamic linkLength fn which traverses the mutable tree (it's passed the link, which I think will have runtime pointers to the nodes?), and then offsets the linkLength dependant upon the current relative positions of the nodes (by subtracting the section of box that it's currently being drawn over, basically). Even if that's possible which I'm not sure of, it seems that it would likely break some assumptions of the algorithm because of the amount the ideal link length is changing as the line goes from vertical to horizontal.