sigma.js
sigma.js copied to clipboard
Parameterize Sigma over the Graph type
This allows for getting the Graph as an object with typed attributes, allowing for type-safely accessing properties through it.
Pull request type
Check the type of change your PR introduces:
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
NOTE: Before to create a PR, read our contributing guide
NOTE: Try to limit your pull request to one type, submit multiple pull requests if needed.
What is the current behavior?
You currently have to create a subclass to put custom data on nodes/edges and have it be type safe.
What is the new behavior?
It's now possible to just specify the exact graph type as a type parameter and it will work.
Other information
NOTE: Any other information that is important to this PR such as screenshots of how the component looks before and after the change.