Giter Site home page Giter Site logo

Comments (3)

tkahn avatar tkahn commented on June 20, 2024

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

from smooth-div-scroll.

css117 avatar css117 commented on June 20, 2024

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 !

from smooth-div-scroll.

tkahn avatar tkahn commented on June 20, 2024

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.

from smooth-div-scroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.