thebird / Swipe

Swipe is the most accurate touch slider.
MIT License
6.79k stars 1.69k forks source link

Handle click events #313

Open colonelchlorine opened 11 years ago

colonelchlorine commented 11 years ago

This seems like an obvious one, but it is not possible to use click events to simulate swipes. Not only does this mean desktop users are left without a usable interface, it makes development cumbersome as the swipeable elements work on touchscreen devices, but not when developing on a PC/laptop.

See nolimits4web/Swiper for an implementation where click events allow dragging of slides. (http://www.idangero.us/sliders/swiper/demos.php)

Fantastic lib for mobile though

alicelieutier commented 11 years ago

On Chrome, you can enable the "emulate touch event" mode, to use the mouse to Swipe. The option is located in the developer tools options: https://developers.google.com/chrome-developer-tools/docs/mobile-emulation#emulate-touch-events

colonelchlorine commented 11 years ago

@alicelieutier that's interesting. Definitely helps the development process but unfortunately still leaves a less than desirable UI for desktop. There are workarounds such as adding Next/Prev buttons ... but I would prefer if functionality were consistent.

dpolivy commented 11 years ago

See my pull request, #329, for an implementation that supports mouse events as well as touch (and MSPointer).