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

Scroll animation for n-anchor #2151

Open
youyinnn opened this issue Jan 10, 2022 · 9 comments
Open

Scroll animation for n-anchor #2151

youyinnn opened this issue Jan 10, 2022 · 9 comments
Labels
effort: low feature request New feature or request

Comments

@youyinnn
Copy link

This function solves the problem (这个功能解决的问题)

User experience improvement

Expected API (期望的 API)

As the title implies

@github-actions github-actions bot added the feature request New feature or request label Jan 10, 2022
@nooooooom
Copy link
Contributor

@07akioni 这个功能是不是可以跟 back top 一起加上

@07akioni
Copy link
Collaborator

@07akioni 这个功能是不是可以跟 back top 一起加上

这个应该会很繁琐,因为浏览器默认的 smooth 滚动是没有成功的回调的,你需要在中间停止监听这些

@07akioni
Copy link
Collaborator

相比于这个,我觉得当 item 太多导致 anchor 溢出时候内部的滚动更重要

@nooooooom
Copy link
Contributor

nooooooom commented Jan 14, 2022

可以用 requestAnimationFrame 自己写个滚动,以此来调控滚动的时长以及动画函数

@07akioni
Copy link
Collaborator

可以用 requestAnimationFrame 自己写个滚动,以此来调控滚动的时长以及动画函数

当然是可以的,我觉得可以加

@07akioni
Copy link
Collaborator

想了想好像不用自己写,我也忘了为啥默认没用 smooth 了,或许是可以的

@nooooooom
Copy link
Contributor

想了想好像不用自己写,我也忘了为啥默认没用 smooth 了,或许是可以的

我下班看看直接用原生的有没有什么影响 我们倒计时那里有个 requestAnimationFrame 的插件,我觉得可以用起来,功能都是从一个量值过渡到另一个量值

@07akioni
Copy link
Collaborator

想了想好像不用自己写,我也忘了为啥默认没用 smooth 了,或许是可以的

我下班看看直接用原生的有没有什么影响 我们倒计时那里有个 requestAnimationFrame 的插件,我觉得可以用起来,功能都是从一个量值过渡到另一个量值

优先原生吧

@youyinnn
Copy link
Author

相比于这个,我觉得当 item 太多导致 anchor 溢出时候内部的滚动更重要

确实

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: low feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants