asvd / dragscroll

micro library for drag-n-drop scrolling style
http://asvd.github.io/dragscroll/
MIT License
1.09k stars 168 forks source link

Overflow-x #21

Closed WPros closed 7 years ago

WPros commented 8 years ago

If you want scroll horizontal then fix event mousemove :D

_window[addEventListener](
    mousemove,
    cont.mm = function (e) {
        if (pushed) {
            (scroller = el.scroller || el).scrollLeft -=
                 (-lastClientX + (lastClientX = e.clientX));
            scroller.scrollTop -=
                 (-lastClientY + (lastClientY = e.clientY) + (1 * $(el).css('padding-top').replace('px','')));
        }
    }, 0
);
asvd commented 7 years ago

What exactly is the problem with horizontal scrolling? Can you show a demo?