There is no field for setting the value for auto play. The 'autoPlay' setting uses the value for the field 'auto_play' which is set to 1. Flickity uses a millisecond value so setting the slider to auto play changes the slide once ever 1 millisecond.
I have attached a patch that fixes this by adding a field to store a value for moving to the next slide.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | flickity-add_autoplay_time-2832571-14.patch | 2.4 KB | earthday47 |
| #8 | flickity-add_autoplay_time-2832571-6.patch | 2.66 KB | tim.cox |
| #2 | flickity-add_autoplay_time-2832571-1.patch | 2.8 KB | Tyler the Creator |
| patch.diff | 4.72 KB | aaronortega |
Issue fork flickity-2832571
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Tyler the Creator commentedThanks for this @aaronortega,
I ran into an issue where enabling autoPlay was causing my carousel to slide out of control. Your work fixed that issue along with adding the ability to change the slide time.
I formatted your diff into an apply-able patch and made a few minor modifications.
Comment #3
Mistah7 commentedHi everyone,
I just wonder if this patch as been included in any of the versions of Flickity.
The patch has a date 7 months ago and I use version: '8.x-2.2' from 2017-09-18 and I still have the same problem with auto play.
Is there something I have missed?
Regards
Comment #4
aaronortega commentedThanks Tyler!
@Mistah7 It has not been applied. Apply the patch from #2 and it will work correctly.
Comment #5
betarobot commentedWorked great for me, patched over 8.x-2.2. The only thing (not sure if it was just me), you have to ignore patch warning (that it was already applied).
Then create a new settings group and it plays well
Comment #6
faridpocket commentedHi,
I'm currently using flickity 8.x-2.2 and my carousell slide is moving crazy fast.
I've tried applying the patch but I get errors "patch does not apply" when applying it.
Can anyone help? :)
Comment #7
tim.cox commentedI had the same issue as #6, so modified the patch in #2 to work with 8.x-2.2. I have tested it on a vanilla Drupal 8 install with Flickity installed. I haven't tested it against 8.x-1.x which is what this issue is assigned to, so patch in #2 is probably best if you are running 8.x-1.x.
Edit: Patch name should be flickity-add_autoplay_time-2832571-6.patch
Comment #8
tim.cox commentedFixed patch name from patch in #7.
Comment #9
shreya shetty commentedComment #10
kellyimagined commented#2 is a great solution for 8.x-2.2
Comment #11
kellyimagined commentedThis should be merged into contrib.
Comment #12
jon pollard commentedI've patched the module - and it makes autoplay usable, which is great. It appears to be the case that whatever number you put in the "Auto Play Time" field, the slideshow moves to the next slide after 3 seconds. Am I doing something wrong?
Comment #13
earthday47Hi everyone, sorry for the late reply and thanks for all the work on this issue. This issue was in place before I took over as maintainer and I never noticed it before.
Unfortunately adding a new config property is difficult because it requires updating the schema, and since the configs besides default can be any name, finding them and doing a schema update is pretty tricky.
Since the original value for `auto_play` was the number of milliseconds for autoplay, I think it makes more sense to handle this in the Form build and keep the underlying value the same. I'll be creating a patch that does that.
Comment #14
earthday47Patch and fork for 3.0.x version. Will merge this after a few days. Hopefully this works for everyone on the new version.
Comment #16
earthday47Committed last patch to 3.0.x.
The previous patches are still available if you were using that method.