Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edges/Ports should support children property (similar to Nodes) #67

Closed
Vadorequest opened this issue Feb 19, 2021 · 3 comments · Fixed by #76
Closed

Edges/Ports should support children property (similar to Nodes) #67

Vadorequest opened this issue Feb 19, 2021 · 3 comments · Fixed by #76

Comments

@Vadorequest
Copy link
Contributor

Currently, the Edge component doesn't support the children property. (or, actually, it does, but does nothing with it)

I think the Edge children should behave similarly to the Nodes, and accept either a component or a function that returns a react component.

I can make a PR for this.

@amcdnl
Copy link
Member

amcdnl commented Feb 22, 2021

Whats the use case for this? Doesn't make sense to me.

@Vadorequest
Copy link
Contributor Author

Allowing the use of foreignObject as children, and draw custom HTML elements such as additional buttons of a different style to replace the built-in Add/Remove components (and other options)

I intend to use it to build my own Add/Remove buttons on edges, with actual HTML/CSS instead of SVG.

@Vadorequest
Copy link
Contributor Author

The same logic applies to ports as well.

I need to display an icon/text next to each port.
For instance, it would be a warning when a port isn't connected with any other node.

I think the same PR should bring support for children in both Ports and Edges.

@Vadorequest Vadorequest changed the title Edges should support children property (similar to Nodes) Edges/Ports should support children property (similar to Nodes) Feb 24, 2021
@amcdnl amcdnl closed this as completed in #76 Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants