flickity-fade icon indicating copy to clipboard operation
flickity-fade copied to clipboard

wrapAround incompatibility with a 2-slide carousel

Open jnicol opened this issue 6 years ago • 30 comments

When there are two slides and wrapAround option is true, the fade is mucked up. It looks like the opacity values are being set as a negative number for one slide (0 ... -1) and values above 1 for the other slide (1 ... 2). The result is that the carousel immediately jumps to the next slide rather than fading.

Test case: https://codepen.io/jnicol/pen/daVWQB

If there are 3 or more slides then the issue is not present.

jnicol avatar Feb 06 '19 00:02 jnicol

Thanks for reporting this issue. I'll take a look.

desandro avatar Feb 11 '19 03:02 desandro

Bumping, have the same issue.

skillmatic-co avatar Mar 22 '19 23:03 skillmatic-co

Also have same issue

timkirtley avatar Apr 04 '19 13:04 timkirtley

Hey @desandro any intel on this? This is sort of a dealbreaker. Super hard to explain this to a client. 😬 If this is just a quick fix to the opacity math I might be up for it.

albell avatar Apr 22 '19 21:04 albell

Also running into the same issue

laurelstreng avatar Apr 25 '19 17:04 laurelstreng

@albell I also needed this for a client and a quick/dirty fix I found was to leave fade set to true and update my CSS to:

    .carousel-cell {
      opacity: 0 !important;
      transition: opacity 1s ease !important;
      &.is-selected {
        opacity: 1 !important;
      }
    }

laurelstreng avatar Apr 25 '19 18:04 laurelstreng

Just to confirm @laurelstreng fix worked for us perfectly. Thanks :)

discoliam avatar May 03 '19 16:05 discoliam

I also had a similar issue, though not with fading. I have four cells in view which flickered when sliding. using the fix above by @laurelstreng and setting initial opacity to 1.

Thanks for the fix :)

ste6412 avatar May 14 '19 21:05 ste6412

Same here. Any updates planned? I know that Metafizzy is now lower priority, but is there any roadmap?

wolffe avatar May 28 '19 15:05 wolffe

+1 on a fix here.

CHEWX avatar Jul 02 '19 12:07 CHEWX

Same problem in our end too.

yllip avatar Aug 06 '19 14:08 yllip

Thank you +1

wgeorgecrisan avatar Sep 30 '19 10:09 wgeorgecrisan

+1 :)

clarknelson avatar Oct 28 '19 15:10 clarknelson

Thanks for the fix! +1 for a better one @desandro :smile:

alexbogias avatar Oct 29 '19 08:10 alexbogias

I think I have a potential fix for this issue. It might not be the root cause, but it works great for me.

https://github.com/metafizzy/flickity-fade/pull/11

joshuapease avatar Feb 14 '20 18:02 joshuapease

I am also having this issue. Any fixes coming?

It is a particular problem in a CMS driven site, where the client sometimes only uploads 2 images to a gallery component.

alexb148 avatar Mar 09 '20 15:03 alexb148

This still isn't fixed :(

sunnyt7 avatar May 04 '20 21:05 sunnyt7

+1 for this issue! Still a problem, though @laurelstreng's solution worked for now.

acflint avatar Jul 07 '20 18:07 acflint

facing the same problem. +1 for a fix @desandro

alex-figge-schuster avatar Jul 13 '20 15:07 alex-figge-schuster

Thanks @laurelstreng - your fix worked a treat!

frazerf avatar Jul 23 '20 02:07 frazerf

Why was this closed? Still having this issue.

ziyadElon avatar Apr 18 '21 11:04 ziyadElon

I am also having the same problem and i don't know how to explain this issue for the client so i decided to start using the swiper plugin, it covers this issue and many other issues. https://swiperjs.com/swiper-api

marcmedhat6211 avatar Apr 28 '21 11:04 marcmedhat6211

@laurelstreng Thank you so much! You saved me.

dpw1 avatar Oct 05 '21 21:10 dpw1

I am also having the same problem and i don't know how to explain this issue for the client so i decided to start using the swiper plugin, it covers this issue and many other issues. https://swiperjs.com/swiper-api

Just as a heads up:

Be careful if you are sticking with Swiper and using lots of images.

I am currently migrating a huge e-com from Swiper to Flickity because it was not able to scale - having more than 15 images on the same slider was freezing the page.

Between all the most popular alternatives (Flickity, Slick, Swiper, Owl Carousel), Flickity was the only one able to properly handle things. (in my experience, of course).

dpw1 avatar Oct 05 '21 21:10 dpw1

@laurelstreng you made my day! Your solution fixed it for me too! :)

thegirlinthecafe avatar Feb 01 '22 11:02 thegirlinthecafe

Cheers, thanks for the fix.

tlhfckoctbcr avatar Feb 09 '22 20:02 tlhfckoctbcr

@laurelstreng works perfectly, thank you.

robinsm avatar May 30 '22 12:05 robinsm

@laurelstreng thanks for the fix! You saved me a headache

andyknapp avatar Jan 12 '23 13:01 andyknapp

Thanks for the fix @laurelstreng !

gavin310 avatar Jan 26 '23 15:01 gavin310

I love that this is still helping people 3+ years later 😄

laurelstreng avatar Jan 26 '23 15:01 laurelstreng