Open pvalin opened 4 years ago
Hi,
When iterating through a link list you should know what node you are working with.
const linkDirection = (node: Node, incoming: boolean) =>
node.links.filter(link => node.id === (incoming ? link.toId : link.fromId))
const incomingLinks = linkDirection(node, true)
const outgoingLinks = linkDirection(node, false)
With link.toId
and link.fromId
you can figure out the direction.
The other possibility is to use the link.data
property to save the "direction"
Hi,
Not really an issue rather an enhancement (or probably I'm hopeless and it's already practicable ^^). Is it possible to show the direction of a link with an arrow or a moving particle like vasturiano's 3d-force-graph :
Thanks for your work in any case! :)