Skip to content

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

@maxschmi

Description

@maxschmi

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageAwaiting triage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions