Skip to content

🐛 [BUG]: fitView is ignoring hiden uninitialized nodes even though { includeHiddenNodes: true } #1801

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

Open
1 task done
maxschmi opened this issue Mar 18, 2025 · 0 comments
Assignees
Labels
bug Something isn't working triage Awaiting triage

Comments

@maxschmi
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and this is a new bug.

Current Behavior

Hello,

I try to fit the Flow Viewport with:

instance.fitView({ includeHiddenNodes: true })

I have several Nodes with property hidden:true at the beginning, but want the viewport to consider them. Unfortunatly it seems, that while they are not initialized, they will not get considered in the fitView command.

If I switch the hidden property once to false and then back to true and then do the fitView everything works as expected.

Expected Behavior

The Viewport should fit to all nodes if includeHiddenNodes: true is passed, not only initialized once.

Steps To Reproduce

  1. Start this CodeSandbox
  2. Initialy there is one hidden node and the fitView when pane is ready doesn't consider the node.
  3. click on the fitView... button to again triger fitting the View --> nothing changes
  4. click twice on toggle hide button to show the hidden node --> outside of the window and then again hidde it
  5. click again on fitView... --> Now the Viewport is adjusted to all 3 nodes extent

Minimal reproduction of the issue with CodeSandbox

https://codesandbox.io/p/devbox/agitated-leakey-4m3dvp

Relevant log output

Anything else?

No response

@maxschmi maxschmi added bug Something isn't working triage Awaiting triage labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants