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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] RotateZ not working in Shared Layout Animation #2611

Open
paul-hellomolly opened this issue Apr 8, 2024 · 2 comments
Open

[BUG] RotateZ not working in Shared Layout Animation #2611

paul-hellomolly opened this issue Apr 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@paul-hellomolly
Copy link

paul-hellomolly commented Apr 8, 2024

1. Read the FAQs 馃憞

馃憤 Yep.

2. Describe the bug

The rotateZ transform property doesn't work on a shared layout animation.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/sandbox/framer-motion-shared-layout-animation-with-rotatez-forked-j8ptt5

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Click the element in the sandbox demo to trigger the animation.
  2. Click the element once more to return to the previous state.
  3. The rotateZ transform no longer works.

5. Expected behavior

Shared layout animation should be able to detect the rotateZ property during animation.

6. Video or screenshots

Screen.Recording.2024-04-08.at.10.32.09.PM.mov

7. Environment details

Operating System: macOS Sonoma 14.0
Browser: Firefox 124.0.2 (64-bit)

@paul-hellomolly paul-hellomolly added the bug Something isn't working label Apr 8, 2024
@mattgperry
Copy link
Collaborator

Can you amend your sandbox to show the reported bug?

Additionally when using layout animations, layout-properties should be set statically via style or CSS, not animated via animate

left: handBounds.width / 2 - 150 / 2

@paul-hellomolly
Copy link
Author

Oh my, I sent the wrong link, my bad! I also updated the sandbox to use the "style" prop as you mentioned.

One thing that I found out is that the shared layout animation seems to work just fine if I change rotateZ to rotate.

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
None yet
Development

No branches or pull requests

2 participants