ragnarlotus / vue-flux

Image slider which comes with 20 cool transitions
https://ragnarlotus.github.io/vue-flux-docs/demos/demos
MIT License
542 stars 49 forks source link

Transition on load #56

Closed d0peCode closed 5 years ago

d0peCode commented 5 years ago

Is it possible to add transition to first image which show after load? Fade for example.

ragnarlotus commented 5 years ago

It's possible if you do it with a simple trick.

Set the image with opacity 0 and set the transition, then when the ready event is fired set the opacity to 1.

By default it is not possible because all transitions are defined to go, not to come. I am not sure if you understand what I mean, but all transitions have a required image from but the image destination is optional dpending on the transition, and that is the opposite of what you want, that is why I recommend you to use CSS and after all is not a big deal, isn't it?

d0peCode commented 5 years ago

Right, thank you once again and great progress with your component. Regards:)