-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Recalculate only works on Y axis #49
Comments
What version are you looking at? It should call recalculate on any change to the DOM regardless the axis. |
Hey, I'm using version 2.0.1. Let's see if i'm getting the implementation right. I'm using the plugin like this:
and then calling recalculate like this:
From my understanding of the source code, it calls recalculate as such:
The problem, in my case, is that 'resizeScrollbar' expects arguments to be passed, and if not, it uses "y" as the default argument.
As recalculate doesn't pass any argument to the 'resizeScrollbar' function, it will always use the "Y" axis to recalculate. As soon as I click on the scrollbar, it calls for the 'flashScrollbar' function that passes arguments to the resizeScrollbar for both "x" and "y" axis.
|
Yes you are right. There is an issue with the implementation of the manual call to |
Hey, The project I'm working uses vue.js for DOM manipulation. I need to test further to check if there are some problems with using simplebar with vue.js. If I'm understanding the code correctly (I need to read more about how a Mutation Observer works), this should be one of the mutation initiations.
For what I tested, this |
Hey, just had a look and you are completely right! |
Glad I could help. Thanks for your time and keep up the good work. :) |
* fix/scrollbar-size-calculation: calling recalculate() now works for both axis (fix #49) add more content to the demo playground fix the scrollbar position calculation (should now work no matter the scrollbar size)
* fix/scrollbar-size-calculation: calling recalculate() now works for both axis (fix #49) add more content to the demo playground fix the scrollbar position calculation (should now work no matter the scrollbar size)
Hey there,
I was having some problems with the plugin, where it only updated an horizontal scroll when using the scrollbar.
Upon inspecting the source code, I realised that the "recalculate" function will only update the "Y" axis, never the "X". I changed the code to allow both axis to be recalculated, but Is there any particular reason why recalculate is not written to work on the "X" axis?
If not, I think it´s something that should be looked upon.
The text was updated successfully, but these errors were encountered: