Skip to content

Link distance relative to edges not midpoint #333

Description

@FalseProtagonist

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.

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions