miromannino / Justified-Gallery

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
http://miromannino.github.io/Justified-Gallery/
MIT License
1.7k stars 299 forks source link

Custom spinner #231

Open JonathanVandal opened 7 years ago

JonathanVandal commented 7 years ago

It's possible to custom the spinner when we are loading the images ? I'd like to had material spinner

miromannino commented 7 years ago

Yes it is quite easy to customize that part, even if you should branch the code in order to do that

I suggest something light like this: https://codepen.io/mrrocks/pen/EiplA

Unfortunately I am not considering to change it, because, especially for infinite scrolling, the spinner needs to be a little bit short since it is at the end of a page.

Depending on what you are doing, if you have the images' width and height I always suggest waitThumbnailsLoad = false

JonathanVandal commented 7 years ago

Branch the code ? Do you mean that I have to edit your library ?

Yeah I have already waitThumbnailsLoad = false and I have the same material spinner.

I have another problem. I'm doing an ajax call and in the success response I initialize the bootstrap modal with the new pictures. And sometimes the first spinner isn't visible while the first picture row is visible. It's possible to force the first spinner on the modal show event ?