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

AnimateKeyframes does not fit within 50px X 50px #40

Closed
gunnarsireus opened this issue Mar 29, 2019 · 20 comments
Closed

AnimateKeyframes does not fit within 50px X 50px #40

gunnarsireus opened this issue Mar 29, 2019 · 20 comments

Comments

@gunnarsireus
Copy link

Hello Bill.
I would like to use the <AnimateKeyFrames ...> component with a svg image. However, the maximum size is 50px X 50px and it seems to be impossible to compress AnimateKeyFrame to fit inside that size.
Thanks in advance, Gunnar Siréus

@bluebill1049
Copy link
Member

hey Gunnar,

can you share your code? looks like it's probably an svg view port issue?

cheers
bill

@gunnarsireus
Copy link
Author

gunnarsireus commented Mar 29, 2019 via email

@bluebill1049
Copy link
Member

Please read the documentation https://react-simple-animate.now.sh/animate-keyframes

You can do code like below

<AnimateKeyframes
play
iterationCount="infinite"
direction="alternate"
durationSeconds={10}
playState="running"
keyframes={[
'transform: rotateX(0) rotateY(0) rotateZ(0)',
'transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg)',
]}

@gunnarsireus
Copy link
Author

gunnarsireus commented Mar 29, 2019 via email

@bluebill1049
Copy link
Member

bluebill1049 commented Mar 29, 2019

any chance you can supply me with your svg? or is it just a react logo?

@bluebill1049
Copy link
Member

bluebill1049 commented Mar 29, 2019

it's a css problem, there is no width for your img. hence it fly off the screen. make sure you inspect the element and check the attribute on your element. if you could leave the repo with a star would be really nice to support the package. thanks ❤️

https://codesandbox.io/s/6wyp4knkj3

@gunnarsireus
Copy link
Author

gunnarsireus commented Mar 30, 2019 via email

@gunnarsireus
Copy link
Author

gunnarsireus commented Mar 30, 2019 via email

@bluebill1049
Copy link
Member

you happy to close this issue?

@gunnarsireus
Copy link
Author

gunnarsireus commented Apr 1, 2019 via email

@bluebill1049
Copy link
Member

thank you very much Gunnar, leave a star if you find it useful 🙏

@gunnarsireus
Copy link
Author

gunnarsireus commented Apr 3, 2019 via email

@gunnarsireus
Copy link
Author

gunnarsireus commented Apr 3, 2019 via email

@bluebill1049
Copy link
Member

Why u couldn’t nest? Can u share the code?

@gunnarsireus
Copy link
Author

gunnarsireus commented Apr 3, 2019 via email

@bluebill1049
Copy link
Member

bluebill1049 commented Apr 3, 2019

do you have an error by nest them? in theory it should worked

@gunnarsireus
Copy link
Author

gunnarsireus commented Apr 3, 2019 via email

@bluebill1049
Copy link
Member

I see the problem please refer to my code below

https://codesandbox.io/s/6wyp4knkj3

you can only have one animation attribute on one element, this is standard css animation.

img {
  animation: "2s linear 0s infinite alternate none running RSI-m25o8kbye";
  animation: "2s linear 0s infinite alternate none running RSI-m25o8kby2";
}

see above if you have two the second one will overwrite. so solution is in my code example as well, take a look and play around with it.

thanks
bill

@gunnarsireus
Copy link
Author

gunnarsireus commented Apr 3, 2019 via email

@bluebill1049
Copy link
Member

not sure about drag and drop, but yea redux is good

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