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

BackTop: use requestAnimationFrame and cubic bezier for scrolling #17057

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

cnlon
Copy link
Contributor

@cnlon cnlon commented Aug 16, 2019

Use requestAnimationFrame(more smoothly) and cubic bezier(acceleration until halfway, then deceleration) for scrolling.

DEMO
After: https://jsfiddle.net/lon/ye1fq9u8/
Before: https://jsfiddle.net/lon/8p5q974z/

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@element-bot
Copy link
Member

Deploy preview for element ready!

Built with commit d961d9d

https://deploy-preview-17057--element.netlify.com

@cnlon cnlon changed the title BackTop: use cubic bezier for scrolling BackTop: use requestAnimationFrame and cubic bezier for scrolling Aug 16, 2019
@wurong wurong merged commit b6b9aae into ElemeFE:dev Sep 2, 2019
@cnlon cnlon deleted the optimize/scrolling-of-backtop branch September 2, 2019 08:11
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

Successfully merging this pull request may close these issues.

3 participants