anvaka / VivaGraphJS

Graph drawing library for JavaScript
Other
3.76k stars 425 forks source link

API question concerning addLink #239

Open Lecrapouille opened 5 years ago

Lecrapouille commented 5 years ago

Hi ! The addLink function creates nodes if they do not exist. The data parameter of this function attaches ... data to the link. But what about created nodes ? They are created without data. Why not having created a function addLink with 3 data: one for the link, one for the "from" node and the last for the "to" node. I think you create Node with data before or after adding links but this is error prone in the case we forget some nodes.

Thx !