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

onlyRenderVisibleElements bug, edges disappear when scaling #2192

Closed
livwvil opened this issue May 31, 2022 · 4 comments
Closed

onlyRenderVisibleElements bug, edges disappear when scaling #2192

livwvil opened this issue May 31, 2022 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@livwvil
Copy link

livwvil commented May 31, 2022

Describe the Bug

I faced with a problem when nested nodes lose their edges when scaling (scrolling). There is a codesandbox with an example of this bug. Also, I noticed, that g_0 node position is matter, if I place it with coordinates { x: 0, y: 0 }, this problem gone away. I saw a couple of similar issues, but seems like I have another one.
Also I'd like to ask you some noob questions:

  1. Can I somehow make group nodes fit the content? Not only expand but also collapse, depending on children position inside.
  2. Can I add some padding to group node?

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Create nested groups (min 3)
  2. Add a couple of nodes inside deepest group
  3. Connect it somehow
  4. Place the top group at { x: 0, y: 1100 }
  5. Try to zoom

Expected behavior

Edges not disapear

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Chrome
  • Version: ^10

Additional context

No response

@moklick moklick self-assigned this Jun 21, 2022
@moklick moklick added this to the 10.3.8 milestone Jun 21, 2022
@moklick moklick added the bug Something isn't working label Jun 21, 2022
@moklick
Copy link
Member

moklick commented Jun 22, 2022

Thanks for the report! Fixed in v10.3.8

@livwvil
Copy link
Author

livwvil commented Jun 22, 2022

Thanks for the report! Fixed in v10.3.8

Thank you! It works!
Unfortunately, I have not found answers to my questions.

@moklick
Copy link
Member

moklick commented Jun 22, 2022

  1. You can measure the bounding box of the children and set the group dimensions with style.width and style.height.
  2. You can use the extent option for this. Let's say your group node is 300x200 and you want a 50px padding on top you could do extent=[[0,50],[300, 200]].

@livwvil
Copy link
Author

livwvil commented Jun 22, 2022

  1. You can measure the bounding box of the children and set the group dimensions with style.width and style.height.
  2. You can use the extent option for this. Let's say your group node is 300x200 and you want a 50px padding on top you could do extent=[[0,50],[300, 200]].

The first solution looks to me like a workaround. But the second one is just great! Both of them can be combined. Thanks a lot for the hint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants