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

Max size of scrollbar thumbs #513

Open
mathsgod opened this issue Jan 18, 2023 · 0 comments
Open

Max size of scrollbar thumbs #513

mathsgod opened this issue Jan 18, 2023 · 0 comments
Labels
accepted Feature requests that have been accepted. idea
Milestone

Comments

@mathsgod
Copy link

mathsgod commented Jan 18, 2023

Motivation

In some of the design, I need to limit the scrollbar thumb max size. For example, I need to change the thumbs shape to circle.
For the current version, if I change thumbs size using css (say fixed 10px), the thumbs will be wrong position when scroll to the bottom.

I know it is because the thumbs offset are updated after render using

\\thumb.ts
 this.offset = scrollOffset / pageSize * (containerSize + (this.realSize - this.displaySize));

Proposal

In the options, provide thumbMaxSize parameter to allow set to thumb max size.

@mathsgod mathsgod added the idea label Jan 18, 2023
@idiotWu idiotWu added the accepted Feature requests that have been accepted. label Jan 18, 2023
@idiotWu idiotWu moved this to IDEA in smooth-scrollbar@v9 Jan 18, 2023
@idiotWu idiotWu added this to the v9 milestone Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Feature requests that have been accepted. idea
Projects
Development

No branches or pull requests

2 participants