Gaya / queryloader2

Version of the QueryLoader by Gaya Kessler. Preload images with ease.
http://blog.gaya.ninja/articles/queryloader2-preload-your-images-with-ease/
MIT License
718 stars 231 forks source link

Add 2 decimal places to percentage on overlay while loading #139

Closed Chris-Reedy closed 9 years ago

Chris-Reedy commented 9 years ago

Is this possible - so instead of 85% it would say 85.51%?

Chris-Reedy commented 9 years ago

I've read about "Double.parseDouble" instead of "parseInt" but I don't know how to implement it into the min.js code.

Gaya commented 9 years ago

I could do a parse to float, but it's not behavior I had in mind. Do you have a use cases for this?

Chris-Reedy commented 9 years ago

It was purely a personal preference that probably wouldn't be of use to a lot of people so I thought it could be a quick edit to the code for my instance. There are times where the loader goes really slow because of the amount of images it is loading and I thought if it was showing 55.13, 55.27, 55.32, 55.48, etc instead of just 55% that it would let the user know that it is loading, it's just really slow at that moment so they don't get impatient and refresh the page or exit.

Gaya commented 9 years ago

QueryLoader only increases its percentage once an image has been loaded, not while the image is loading. Adding more decimals wont solve the "it's not doing anything" problem. Maybe you can optimize the images it's loading so it doesn't take that long. Will close this issue since it's not a feature I am planning to build in. Thanks for thinking along!

Chris-Reedy commented 9 years ago

Ohhhhhh...okay, that makes sense. Thanks!