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

Weird transform matrix generated while combining object-fit and react-flip-toolkit #129

Open
Losses opened this issue Jul 2, 2020 · 3 comments

Comments

@Losses
Copy link

Losses commented Jul 2, 2020

Minimal bug demo:
https://codesandbox.io/s/react-flip-toolkit-bugreport-01-09ywo?file=/src/styles.css

The image is not transformed smoothly, with a weird bounce.

@aholachek
Copy link
Owner

Thanks for making a demo!
I'm sorry to say I don't think react flip toolkit can tween images that change their aspect ratio as part of the transition very well. For a smooth transition I think you need to remove either the height or width params to prevent the aspect ratio from changing: https://codesandbox.io/s/react-flip-toolkit-bugreport-01-3kk9u?file=/src/styles.css (which I understand might not be an ok solution for your use case).

@Losses
Copy link
Author

Losses commented Jul 2, 2020

@aholachek Hi! thanks for you reply! I wonder if react-flip-toolkit can expose an API to let me tune the transform matrix manually based on what is already calculated by the package.

I've found a way to fix the start point and end point of the matrix but can't do anything to apply my fixing solution.

@aholachek
Copy link
Owner

aholachek commented Jul 2, 2020

It's possible, but probably not something I would be able to work on for the foreseeable future. In case you'd like to look into it a bit more and possibly make a pr, this part of the code would be worth exploring.

@aholachek aholachek reopened this Nov 5, 2020
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

2 participants