dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.18k stars 3.31k forks source link

Preloader animation position #1137

Open arnisjuraga opened 8 years ago

arnisjuraga commented 8 years ago

Hi!

Can I change pswp__preloader element position - move it from top bar to the center of opened large image?

Have enabled it with (for some reason, it was not "on" by default):

preloaderEl: true

But it is quite small and appears in the top of window - it's not noticeable enough.

image

selenearzola commented 6 years ago

Hi, @arnisjuraga do you solve this? I'm experiencing for the same situation :(

selenearzola commented 6 years ago

I've solved this by adding an id to the pswp__preloader class and in my stylesheet:

centered-preloader {

position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin:auto;

}

Hope it helps someone who experiments the same situation :)

kerns commented 4 years ago

@arnisjuraga Very old issue, I know, but I am tormented by this one. It seems like the loading indicator is completely broken. I would also like to get it working, but I find it out that the template has a preloader defined as follows:

        <div class="pswp__preloader">
          <div class="pswp__preloader__icn">
            <div class="pswp__preloader__cut">
              <div class="pswp__preloader__donut"></div>
            </div>
          </div>
        </div>

But then zero mention of pswp__preloader in any script anywhere. What do you make of this and did you ever update your loading indicator to a more modern, centered layout?

selenearzola commented 4 years ago

Yes, there is not mention as I said you have to add it on your stylesheet the code below:

centered-preloader {

position: fixed; top: 0; left: 0; right: 0; bottom: 0; margin:auto; }