malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

Image transparency shows two slides at once - nested slideshow #534

Open jasminesilver opened 10 years ago

jasminesilver commented 10 years ago

Main issue: It seems that, for a second, both slides show at the same time; the next slide behind the current slide.

I am using the Cycle2 plugin with transparent-background slides over a stationary background image. I also have two nested slideshows within the main slideshow; these nested slideshows show the UV light source turning on and off. As you can see on slide 4 (a nested slideshow), it seems that, for a second, both slides (in the nested slideshow) show at the same time; the next slide (light on) behind the active slide (light off) -- this makes the on/off look a bit strange. http://phoseon.com/

In this closed issue, it says: The default behavior is to hide non-active slides. https://github.com/malsup/cycle2/issues/90

Is there something that I am missing? It seems like the default behavior is to hold the active slide over the next slide for a moment before the next slide become the active slide.

afs6969 commented 8 years ago

Hey, I was having the same problem with fx scrollHorz. The problem is that the animation put the slide back to left 0 before the visibility hidden is applied. I make to work by changing the position to -9999px.

Search the line: opts.cssAfter = { zIndex: opts._maxZ - 2, left: 0 };

Change to: opts.cssAfter = { zIndex: opts._maxZ - 2, left: -9999 };