Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrapAround incompatibility with a 2-slide carousel #1

Open
jnicol opened this issue Feb 6, 2019 · 30 comments
Open

wrapAround incompatibility with a 2-slide carousel #1

jnicol opened this issue Feb 6, 2019 · 30 comments
Assignees

Comments

@jnicol
Copy link

jnicol commented Feb 6, 2019

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.

@desandro
Copy link
Member

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

@skillmatic-co
Copy link

Bumping, have the same issue.

@timkirtley
Copy link

Also have same issue

@albell
Copy link

albell commented Apr 22, 2019

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.

@laurelstreng
Copy link

Also running into the same issue

@laurelstreng
Copy link

laurelstreng commented Apr 25, 2019

@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;
      }
    }

@discoliam
Copy link

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

@ste6412
Copy link

ste6412 commented May 14, 2019

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 :)

@wolffe
Copy link

wolffe commented May 28, 2019

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

@CHEWX
Copy link

CHEWX commented Jul 2, 2019

+1 on a fix here.

@yllip
Copy link

yllip commented Aug 6, 2019

Same problem in our end too.

@wgeorgecrisan
Copy link

Thank you +1

@clarknelson
Copy link

+1 :)

@alexbogias
Copy link

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

@joshuapease
Copy link

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

#11

@alexb148
Copy link

alexb148 commented Mar 9, 2020

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.

@sunnyt7
Copy link

sunnyt7 commented May 4, 2020

This still isn't fixed :(

@acflint
Copy link

acflint commented Jul 7, 2020

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

@alex-figge-schuster
Copy link

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

@frazerf
Copy link

frazerf commented Jul 23, 2020

Thanks @laurelstreng - your fix worked a treat!

@ziyadElon
Copy link

Why was this closed? Still having this issue.

@marcmedhat6211
Copy link

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

@dpw1
Copy link

dpw1 commented Oct 5, 2021

@laurelstreng Thank you so much! You saved me.

@dpw1
Copy link

dpw1 commented Oct 5, 2021

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).

@thegirlinthecafe
Copy link

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

@tlhfckoctbcr
Copy link

Cheers, thanks for the fix.

@robinsm
Copy link

robinsm commented May 30, 2022

@laurelstreng works perfectly, thank you.

@andyknapp
Copy link

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

@gavin310
Copy link

Thanks for the fix @laurelstreng !

@laurelstreng
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests