Allow nodes/edges to have arbitrary data associated with them
Not sure what the best API for this is...
Why not just having arbitrary fields (stored as an associative array) and being able to access them through a normal getter function?
That way, the second parameter passed to the node constructor (props) can be exactly that set of arbitrary data, with the 'id' and 'color' elements being special.
Why not just having arbitrary fields (stored as an associative array) and being able to access them through a normal getter function?
Sounds good
That way, the second parameter passed to the node constructor (props) can be exactly that set of arbitrary data, with the 'id' and 'color' elements being special.
I'd rather keep these separate. There are so many 'special options', I don't want to confuse anyone if they accidentally run into an option.