cycle2 icon indicating copy to clipboard operation
cycle2 copied to clipboard

swipe action to pull slide along with gesture rather then just respond upon gesture release...

Open leafling opened this issue 12 years ago • 20 comments

This is a feature request. I'd like to see the swipe mechanism actually pull the slide along in the direction of the swipe in the same manner as this does:

http://stephband.info/jquery.event.swipe/

I suppose it may be necessary to consider the direction of the slide transitions -- ie, a vertically transitioned slideshow would only respond to up/down gestures and a horizontal one would only respond to left/right swipes..

leafling avatar Feb 18 '13 21:02 leafling

I was going to request the same feature, this type of swipe and css3 transitions are the only things stopping me moving from flexslider.

g5604 avatar Feb 20 '13 10:02 g5604

I am also after the exact same thing. The problem as it stands is that it isn't really obvious that you can swipe unless you actually complete the gesture. People tend to be used to 'dragging' things around to see if they allow 'swiping', but cycle2 doesn't give you any feedback in this way.

I have a slightly similar feature request to the above. Is it possible to use a different effect on swipe? For example, I usually like to use a 'fade' slideshow by default, but on swipe I would prefer to use the horizontal scroll effect. Is this possible?

tombrickman avatar Apr 04 '13 11:04 tombrickman

I agree completely, this is the only reason that I need to revert to flexslider on certain cases. Love the simplicity of this plugin in all other respects, just wonder whether this would ever be possible?

timkirtley avatar Jun 06 '13 14:06 timkirtley

+1 please Mike....

Colir avatar Feb 06 '14 11:02 Colir

+1 - I used to use a branch of Cycle 1 which had this feature - Would be really nice to have again!

jacobsjensen avatar Feb 15 '14 11:02 jacobsjensen

This seems to do the trick http://jquery.malsup.com/cycle2/demo/manualFx.php

noraheuer avatar Feb 26 '14 03:02 noraheuer

@noraheuer ...nope..

Colir avatar Feb 26 '14 11:02 Colir

It might, if we knew how to create a manual FX which would do what we want... Do you @noraheuer ?

jacobsjensen avatar Feb 26 '14 12:02 jacobsjensen

Why don't you google it? https://github.com/stephband/jquery.event.move

noraheuer avatar Feb 26 '14 12:02 noraheuer

Besides it's not really a swipe if you're moving it around?

noraheuer avatar Feb 26 '14 12:02 noraheuer

I've created these 2 plugins that I think add the feature that you are looking for. They allow you to move the slides "freely" sideways (or vertically), with the slides actually following the position of your finger.

Here's a demo (you need a touch-enabled device or enable touch events in your browsers developer tools): Demo: http://codepen.io/gabrielfin/full/gbwGOx/ Plugin: https://github.com/gabrielfin/cycle2/blob/issue-103/src/jquery.cycle2.glide.js To enable, add the property data-cycle-glide="true" (glide: true in JS) or data-cycle-glide="vertical" (glide: 'vertical' in JS).

That plugin won't work with carousels. Instead, you should use this one: Demo: http://codepen.io/gabrielfin/full/ogzGXx/ Plugin: https://github.com/gabrielfin/cycle2/blob/issue-103/src/jquery.cycle2.carousel-glide.js To enable, add the property data-cycle-carousel-glide="true" (carouselGlide: true in JS).

gabrielfin avatar Dec 25 '14 20:12 gabrielfin

+1

michaelpumo avatar Jan 22 '15 13:01 michaelpumo

@gabrielfin - I have used your plugin for 'glide' functionality and it appears to work great, but does not seem to fire events like 'cycle-after'. Any ideas why this happens and how to fix it?

michaelpumo avatar Jan 26 '15 19:01 michaelpumo

@gabrielfin, I've added a "resume" feature, assuming the event was a click, at gabrielfin/cycle2#1. Thanks for your helpful plugin!

jacobroufa avatar Mar 02 '15 17:03 jacobroufa

@michaelpumo fixed: 01b792a479cf8535c410731f6ae2c7014203169b

gabrielfin avatar Mar 07 '15 20:03 gabrielfin

@gabrielfin Plugins work great!

alexelash avatar Sep 03 '15 18:09 alexelash

+1

ruanmer avatar Feb 04 '16 14:02 ruanmer

+1 @gabrielfin thank you for the great plugin! (Maybe this plugin should be inserted in the official Cycle2 page)

allysonsouza avatar Apr 20 '17 20:04 allysonsouza

+1 and thanks @gabrielfin !

gumroler avatar Oct 20 '17 06:10 gumroler

Thanks @gabrielfin ! I have a couple of questions:

  1. Is there anyway to prevent vertical scrolling on the web page while someone is horizontally scrolling a glide enabled carousel?
  2. Is it possible to enable "momentum" swiping so that the carousel items move across the screen when you flick more quickly, and so that the carousel items don't snap back to the initial framing that shows whatever the "carouselVisible" was set to? I suppose triggering the "cycle-after" is what creates that snapping.

FisherFast avatar Jul 20 '18 17:07 FisherFast