backdrop-contrib / colorbox

A port of the Colorbox Drupal 7 module to BackdropCMS
GNU General Public License v2.0
3 stars 7 forks source link

Add swipe functionality for touch sensitive screens. #12

Open Graham-72 opened 7 years ago

Graham-72 commented 7 years ago

It would be good to add the jQuery plugin TouchSwipe so that users with touch sensitive screens can swipe through a sequence of photos.

A method is described at https://github.com/jackmoore/colorbox/issues/395.

D7 has an issue at https://www.drupal.org/node/1532326 but this was closed 4 years ago because 'doesn't seem to affect a lot of users' - perhaps true then but not now.

There is also the D7 project 'Colorbox Swipe Gestures Support' at https://www.drupal.org/project/colorbox_swipe.

jenlampton commented 7 years ago

Do we already have this jQuery plugin in core? Maybe I'm thinking of something else we added with admin bar... Yes, either way. This would be a valuable addition!

Graham-72 commented 7 years ago

I have now ported the colorbox_swipe module to backdrop https://github.com/backdrop-contrib/colorbox_swipe and this uses two additional jQuery libraries, jQuery.event.swipe and jQuery.event.move, but when used in this module a swipe merely causes the image to change, it does not slide the image left or right.

The views_slideshow_galleria module (already ported to Backdrop https://github.com/backdrop-contrib/views_slideshow_galleria) uses the Galleria library which includes swipe functionality and produces a gallery that does slide images left or right which is perhaps better.