graphosaurus icon indicating copy to clipboard operation
graphosaurus copied to clipboard

Allow nodes/edges to have arbitrary data associated with them

Open frewsxcv opened this issue 9 years ago • 2 comments

Not sure what the best API for this is...

frewsxcv avatar Mar 30 '16 04:03 frewsxcv

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.

JakeArkinstall avatar Apr 13 '16 18:04 JakeArkinstall

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.

frewsxcv avatar Apr 18 '16 00:04 frewsxcv