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

Animated: false won't work #3

Closed
Nimrod-666 opened this issue Jun 25, 2021 · 4 comments
Closed

Animated: false won't work #3

Nimrod-666 opened this issue Jun 25, 2021 · 4 comments
Labels
question Further information is requested

Comments

@Nimrod-666
Copy link

First of all congrats for the new release, it looks very cool so far!

A thing i discovered is that setting animations inactive won't work. I tried

Fancybox.bind("[data-lightbox]", {
    showClass: false,
    hideClasse: false
}

or

Fancybox.bind("[data-lightbox]", {
    animated: false
}

but both variants won't prevent fancybox to bring the slide and fade animation on showing images.

but both

@Nimrod-666
Copy link
Author

Oh and i tried


Fancybox.bind("[data-lightbox]", {
    options: {animated: false}
}

but that did not work either

@fancyapps
Copy link
Owner

Hi,

First, all your snippets have syntax error - missing closing ) and you have used hideClasse instead of hideClass.

Secondly, are you sure you have used data-lightbox and not data-fancybox attributes on your links?

Here is working demo of all animations disabled - https://fancyapps.com/playground/gS

Thanks for the feedback!

@fancyapps fancyapps added the question Further information is requested label Jun 25, 2021
@Nimrod-666
Copy link
Author

Hi yes sorry i wrote the snippets from memory, the closing ) is there and yes its data-lightbox by my side. The windows opens normally and everything works so far. But your example helped. The

Image : {
   zoom: false
}

was missing. I thought that animation: false alone would do the trick. Thank you!

@fancyapps
Copy link
Owner

fancyapps commented Jun 28, 2021

It is actually pretty straightforward -

  • Zoom in/out animations are provided by Image plugin and you can toggle them using zoom option.
  • If zoom animations are disabled, then content (e.g. image in this case) is revealed/hidden just like any other content - using CSS animations, and you can customize them using showClass and hideClass options. Btw, you can easily create your own animations as seen here - https://fancyapps.com/playground/gd
  • To provide even greater customization, animation option is provided to toggle animations (fade in/out by default) for backdrop and UI elements. That means, you can display content without any animation, but have nice fading of the backdrop. Or you can disable and then Fancybox will just appear without any animation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants