-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Fixed thumb size calculation when track height is not equal to content height #381
base: develop
Are you sure you want to change the base?
Conversation
@@ -72,6 +72,7 @@ export class ScrollbarTrack implements I.ScrollbarTrack { | |||
display: pageSize <= containerSize ? 'none' : 'block', | |||
}); | |||
|
|||
this.thumb.update(scrollOffset, containerSize, pageSize); | |||
const trackHeightOffset = (this.direction === TrackDirection.Y ? this.element.offsetHeight : this.element.offsetWidth) - containerSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I think the thumb size would be trackSize / pageSize
in that case, so leaving the 3rd parameter as pageSize
is enough (the next line). Have you tested it?
PS: and the 2nd parameter should be the track's size
Let's leave this PR open as it's not the expected behavior of a standard scrollbar. I'll consider whether to merge it or not in the next major release. |
Any updates? It should be expected behavior that one wants to adjust the height of the track and scrollbar... |
Description
Types of changes