baptistebriel / smooth-scrolling

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

Add virtual-scroll useKeyboard option support #106

Open weotch opened 5 years ago

weotch commented 5 years ago

This adds support for the useKeyboard option: https://github.com/ayamflow/virtual-scroll/blob/master/src/index.js#L37.

Also, it fixes issues where a user might set a boolean option to false explicitly but, instead, the default value would be use. Like right now, if preventTouch is false like:

new SmoothCustom({
  vs: { preventTouch: false }
})

... It will get re-set to true via:

this.options.vs.preventTouch || true