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

Immediately set the scroll position #115

Closed
ZachSaucier opened this issue Jun 29, 2020 · 2 comments
Closed

Immediately set the scroll position #115

ZachSaucier opened this issue Jun 29, 2020 · 2 comments

Comments

@ZachSaucier
Copy link

Is there a function or property that I can use to set the scroll position to a given value immediately instead of over time like .scrollTo()? Or a way to use a custom duration (of 0) to .scrollTo()?

@ZachSaucier
Copy link
Author

ZachSaucier commented Jun 29, 2020

smooth.vars.current = val
smooth.vars.target = val

This seems to do it.

@baptistebriel
Copy link
Owner

baptistebriel commented Jun 29, 2020 via email

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