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

Svg path not completey animated except its stroke only #317

Closed
sakhisheikh opened this issue Nov 11, 2018 · 4 comments
Closed

Svg path not completey animated except its stroke only #317

sakhisheikh opened this issue Nov 11, 2018 · 4 comments

Comments

@sakhisheikh
Copy link

I'm trying to animate complete svg as shown in my example but only its stroke part is animated. I have added both actual and expected results in my codesandbox. How can we interpolate the remaining parts of it (filled one) like in this example of react-mvt-svg-lines
PS I have already interpolated strokeDashoffset atribute. What other attributes needs to be interpolated.

Here is my codesandbox: https://codesandbox.io/s/9llxp0zx8o

image

@drcmda
Copy link
Member

drcmda commented Nov 11, 2018

I don't know svg good enough to tell you which svg props do what but if you find a resource that tells you how to operate dasharray correctly then you'll be able to animate it like that with react-spring.

@drcmda
Copy link
Member

drcmda commented Nov 11, 2018

PS. i found this example, someone else made it: https://codesandbox.io/embed/4zppn84yj4 no idea if it helps but it looks like what you want to me.

@sakhisheikh
Copy link
Author

Thanks @drcmda for this example. What I've figured out. We need SVGs with stroke along single line path. Here is the issue with my SVG. It's not created as desired to be. Anyways thanks to you. I'll try to make right SVG and would love to make a PR in examples.md.

@drcmda
Copy link
Member

drcmda commented Nov 11, 2018

sure, looking for good examples ...

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