asvd / dragscroll

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

support mobile #32

Open Pranz opened 7 years ago

Pranz commented 7 years ago

Adds support for mobile.

ma-pe commented 6 years ago

Thumbs up from my side! :)

ma-pe commented 6 years ago

Simple Touches doesn't work anymore. I had to comment out

e.preventDefault();

in

mousedown.split(' ').forEach(function(ev) { ... }

Pranz commented 6 years ago

@ma-pe I think that might mess up stuff depending on the browser. I found if you want dragscroll + interactive elements within there's no silver bullet and you're gonna need a bit of custom code, so I think I'll leave my branch as i for now.

Thanks for the report!

skeddles commented 1 year ago

i know this is super stale, but just in case anyone else finds this:

I realized you dont actually need dragscroll on mobile, it's just how mobile works by default. all you gotta do is overflow: scroll

using this version gave me a weird bug where things scroll twice as fast as they should.