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

Enable is not the exact opposite of disable #47

Closed
css117 opened this issue Sep 30, 2012 · 3 comments
Closed

Enable is not the exact opposite of disable #47

css117 opened this issue Sep 30, 2012 · 3 comments

Comments

@css117
Copy link

css117 commented Sep 30, 2012

Hello,
I disable the smoothdivscroll when I load more content into it.

My smoothdivscroll options :
hotSpotScrolling: true,
touchScrolling: true,
manualContinuousScrolling: false,
mousewheelScrolling: "vertical",

When ajax is done, I enable it back.

But the mousewheel doesn't work anymore, with or without recalculateScrollableArea.

Thanks in advance.

PS : why would recalculateScrollableArea have to go back to the beginning of the scroll ?

@tkahn
Copy link
Owner

tkahn commented Oct 3, 2012

This is strange since I don't really disable mousewheel scrolling in the disable function - I just set the "enabled" variable to false. Then I check if the "enabled" variable is true or false in the event handlers. So when you scroll using the mousewheel an event is triggered and if the variable "enabled" is true the scroller should scroll. If it's false the event handler will still execute but nothing will happen since "enabled" is false.

So I'm thinking there might be something else going on here?

Regarding the resetting of the scroller position to the starting point, is most likely a legacy thing. It's been that way since the first version and I'm not really sure why I implemented it that way in the first place, but I think it was because I wanted to reset the position if you replaced the content in the scroller. Or there could have been some browser bug that prevented the scroller from working in a specific browser.

I will do some testing and remove it if I find it's not needed. You can comment out rows 1026-1027 in the source code and make a new minified version here: http://marijnhaverbeke.nl/uglifyjs

@css117
Copy link
Author

css117 commented Oct 3, 2012

Indeed, I allready commented those lines, wihtout any side effects :)
And I abandonned the disabling / enabling actions because I'm triggering loading stuffs before the end is reached, so I don't need any disabling anymore.
Thanks !

@tkahn
Copy link
Owner

tkahn commented Oct 4, 2012

Okay! I will close this issue now!
The result is that the resetting of the scroller position will be removed in the next update since I don't think it fills any purpose anymore.

@tkahn tkahn closed this as completed Oct 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants