react-digraph icon indicating copy to clipboard operation
react-digraph copied to clipboard

Improved Custom Component Support

Open jtfell opened this issue 6 years ago • 1 comments

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 input component can be used inside a node. I will be adding a new optional callback to avoid a breaking change to the API.
  • An improved renderNode API 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.js module 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 avatar Oct 01 '19 11:10 jtfell

@jtfell I cannot see these changes in the current(latest) version, Please help I have the same issues that you have mentioned above.

Bhagyashri1808 avatar Jul 31 '21 17:07 Bhagyashri1808