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

Out-of-bounds nodes can break FlowChart #256

Open
2 tasks
jakubfaliszewski opened this issue Oct 18, 2022 · 5 comments
Open
2 tasks

Out-of-bounds nodes can break FlowChart #256

jakubfaliszewski opened this issue Oct 18, 2022 · 5 comments

Comments

@jakubfaliszewski
Copy link

Hi @MrBlenny and everyone!
While working with https://github.com/MrBlenny/react-flow-chart I encountered a problem with disappearing links between nodes. It occurs when nodes are far away from each other or when zoom factor is high enough so nodes are out of bounds. This causes children of InnerCanvas to not be rendered.
It seems that nodesInView that contains of nodes that are only in view was designed to not render unnecessary nodes due to the performance issues, but it creates some problems. When nodes are removed links between them cannot exist which leads to hiding links that should be visible and to rendering errors.

Problem

Links that should be visible can be hidden because nodes are removed when they are positioned out of bounds.
Demo - here you can see that links disappears after zooming in and everything goes wild after zooming out:
demo

Solution

I propose two solutions here:

  • allowing to remove filtering of out of bounds nodes by additional configuration - if new prop is set to true nodesInView will be just Object.keys(nodes)
  • not removing nodes at all, just use some CSS styling to reduce performance impact (maybe visibility: hidden will do the job)
@Derick1530
Copy link

@jakubfaliszewski seems like this is no longer maintained any libray out there you can suggest?

@williank
Copy link

williank commented Mar 3, 2024

Has any lib replaced this?

@Derick1530
Copy link

Yeah, react flow

@williank
Copy link

williank commented Mar 3, 2024

Your have link repository ?

@Derick1530
Copy link

Derick1530 commented Mar 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants