Profectus / features/links/links
features/links/links ​
This feature represents lines linking any other features that can be rendered. You can tell it what items to link and it will handle calculating their positions and updating the line between them as needed.
For Trees specifically, you don't need to use links directly as they have a branches
property that handles rendering lines as well as defines reset propagation.
ts
const links = createLinks(() => ({
links: [
{ startNode: ach1, endNode: ach2 },
{ startNode: ach3, endNode: ach2 },
{ startNode: ach1, endNode: ach3 }
]
}));