-
Hello, I’m working on a new project for which I use Smooth Scrollbar and a custom-made smooth-scrollbar plugin that is meant to handle a special-looking scrollbar. Because of this, I don’t need Smooth Scrollbar’s own scroll tracks and thumbs. It’s not the first time I wished I could keep Smooth Scrollbar from appending its own tracks and thumbs to the DOM, but making my own plugin to handle special tracks and thumbs makes it even more obvious to me that such a parameter would be really useful. Does anyone else feel that way? Thanks, and keep up the good work on this pretty amazing lib! 👍🏻 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I'm afraid there's no plan for such an option. But you can remove the tracks by scrollbar.track.xAxis.element.remove()
scrollbar.track.yAxis.element.remove() |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. :-) Actually, removing the tracks from the DOM or hiding them in CSS is pretty much what I’m doing right now. I was hoping for a more elegant way to handle it, such as an option when you create the Scrollbar instance. That way, it could also save some calculations on render and could keep Smooth Scrollbar from trying to apply styles to elements that will not be rendered in the first place. |
Beta Was this translation helpful? Give feedback.
-
Yes, I got your point. But the problem is that a scrollbar without a scrollbar is not a so-called scrollbar 🙃. The scrollbar tracks and thumbs are the core of this library. This library is never trying to implement another scrollbar, it's basically aiming to provide a way to customize scrollbars. So, like I've said in other issues, anything that is not an expected behavior of a scrollbar should not be added into this library. ;) |
Beta Was this translation helpful? Give feedback.
I'm afraid there's no plan for such an option. But you can remove the tracks by