baptistebriel / smooth-scrolling

smooth scrolling and parallax effects on scroll
MIT License
612 stars 75 forks source link

scrollTo with scroll disabled #83

Closed mourtazag closed 3 years ago

mourtazag commented 6 years ago

Hello,

First of all, THANK YOU for this librairy, it is so fun to play with it and we can do such beautiful things !

Here is my problem :

How can i do that ? When I turn off smooth (smooth.off), the scrollTo method doesn't work anymore.

An other problem (related but maybe an other issue) : Is it possible to have different behaviour on my mousemove thing and the usual scroll. For example, I would like a different ease value for the scrollTo method than the usual scroll.

Thank you again and sorry for the disturbance. Mourtaza.

baptistebriel commented 6 years ago

Hi @mourtazag,

Sorry for the late reply! You could rewrite the index.js file as you need; if you're using the npm module I'd suggest to copy and paste the file in your project directory.

To remove the mousewheel event, you can comment this line. Just a heads up, don't forget to comment the related line in the off function as well.

For the last question, I guess you could probably add another parameter into the function with an ease value so it's not the same between mousemove and mousewheel events.

Hope it helps!

mourtazag commented 6 years ago

Thank you very much for your answer ! I'll try what you suggest ! : )