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

Retain left/top position when hiding a group using setVisible #692

Open
borglin opened this issue Aug 22, 2024 · 0 comments
Open

Retain left/top position when hiding a group using setVisible #692

borglin opened this issue Aug 22, 2024 · 0 comments

Comments

@borglin
Copy link

borglin commented Aug 22, 2024

Is your feature request related to a problem? Please describe.
I've tried to add animation when toggling the visibility of a group of panels by adding a CSS transition for the width/height and left/top property. It worked surprisingly well when I was on version 1.14.2 but after upgrading to 1.16.1 the left/top position is set to 0 when calling setVisible(false) instead of setting it to the hidden group's position. Here's a version using v1.14.2 https://codesandbox.io/p/sandbox/musing-noether-dxnf8c. If you hit Hide panel you can see the animation, but if you change version to 1.16.1 you can see that it no longer looks right when the panel flies out from the left hand side.

Describe the solution you'd like
I'd like to retain the left/top position of a hidden panel, exactly to what it was in 1.14.2 or understand if there's a way to work around this change.

Describe alternatives you've considered
Not using setVisible and instead only manipulating the group width/height but that requires keeping a reference of the previous width/height and any constraints needs to be set to 0 and then reset. See this example https://codesandbox.io/p/sandbox/affectionate-lucy-jnzqhg

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

1 participant