ilyashubin/scrollbooster

Doesn't work horizontal scrolling on mousewheel

Opened this issue · 0 comments

It doesn't work

new ScrollBooster({
    viewport,
    content,
    direction: 'horizontal',
    emulateScroll: true,
    onUpdate: (state) => {
        content.style.transform = `translateX(${-state.position.x}px)`
    }
})

If you use native scrolling, scrolling is handled by browser itself:

new ScrollBooster({
  viewport,
  content,
  direction: 'horizontal',
  onUpdate: (state) => {
    viewport.scrollLeft = state.position.x;
  }
})

Originally posted by @ilyashubin in #19 (comment)

JsFiddle: https://jsfiddle.net/eq3cntow/93/