react-digraph
react-digraph copied to clipboard
Improved Custom Component Support
Hi guys, I'm a big fan of this library! While it has some support for custom components as nodes, it is lacking a few things that will make it usable (for my use case at least). At this point it seems to me that the missing pieces are:
- Ability to override click events to not trigger re-renders. This is needed so an
inputcomponent can be used inside a node. I will be adding a new optional callback to avoid a breaking change to the API. - An improved
renderNodeAPI to pass through more information. Currently it lacks some of the props that are passed to the standard SVG components. I am thinking that I will just pass the extra props through as an extra parameter to avoid a breaking change to the API. - Improved support for edges to locate and calculate intersect points off custom components. I am just starting to investigate this one but suspect the changes should be encapsulated inside the
edge.jsmodule to do a better job of identifying the bounds of custom-rendered components.
I will be submitting PRs for each of these points and would be glad to get some feedback on the design and implementation of these changes. Cheers!
@jtfell I cannot see these changes in the current(latest) version, Please help I have the same issues that you have mentioned above.