Closed prateekbh closed 5 years ago
Isn't there hammer.js
? Or do you know something else that has that ability?
@developit has the script to do this. we just have to ask for it and paste it here I guess. Otherwise we can evaluate something like hammer/tocca.js
@prateekbh I just tried hammer.js
and it would also work: https://gist.github.com/cromefire/8a5e69f61d69d165f9988a63d0b78645
right, i'd like to take a look at @developit 's script as well as I know that comes without dependencies
I didn't find it, so I couldn't try
@cromefire @prateekbh sorry about that - it's here: https://gist.github.com/developit/a78fceed440b98e62582e4440b86bfab
The main benefit of this is that it supports dragging to open, not just swipe gesture causing an open action. Also worth noting that the code intentionally only handles dragging the drawer open because mdcweb has its own handling for swiping to close. Personally I think it'd be nice to go with my handling for both since it seems to perform a bit better on low-end devices. There's a comment at the spot where that can be enabled.
Thanks
But I think we should make this either opt in or opt out (I would prefer opt out; So that it is seperated from the original drawer)
@developit @cromefire I don't know if this is a bad or a good news but mdc-web dropped support for even closing the drawer with gesture.. 🤣 Dropped support for such basic use cases is what made us re-think our position of opnionless wrapper over mdc-web
Probably good news, it was annoying to disable swipe close gestures.
Merged into 2.0
We need to add support for swipe gesture to our modal drawer, because its 2019.