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

Trigger SVG to draw as soon as you see it (very large SVG) #231

Closed
frazerf opened this issue Feb 12, 2021 · 1 comment
Closed

Trigger SVG to draw as soon as you see it (very large SVG) #231

frazerf opened this issue Feb 12, 2021 · 1 comment

Comments

@frazerf
Copy link

frazerf commented Feb 12, 2021

I've got a very large SVG (150vh) and it's drawing fine but only when I reach the end of the SVG, at which point the user has already scrolled passed the majority of the animation. Is there a way of starting the animation when it first comes in to view? I'm using start: inViewport but that still seems to wait until the enitre SVG is in view before triggering.

@maxwellito
Copy link
Owner

In this case I would recommend you to keep the start option to manual, and code the trigger that suits you. There are libraries that can help you about it. The 'inViewport' setting in Vivus doesn't provide much option and sadly doesn't fit every need.

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