Open tom-leys opened 10 years ago
Good point, I'd be happy to work this in.
+1
too many NProgress.set() call and it was very sloooow. I think it must be fixed.
and my current fix:
NProgress.done = function(force) {
if (!force && !NProgress.status) return this;
$("#nprogress").clearQueue();
$("#nprogress").stop();
return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
};
I think NProgress.done() must have clearQueue() and stop()
Wonderful progress bar. I'm integrating it into our dashboard at the moment. Our site is here see for instance this dashboard
We load about 20-30 data files in the background, sometimes. The number depends on the user navigation. I track the number of files and invoke NProgress like so:
---- And in Ajax callback
-- I found that it could take seconds after all the loads were finished until the animation completed. It was because you are queuing animations, and I am putting up to 30 little animations into the queue.
My config is like this
For now my solution is to limit the number of animations in the queue, but my preference is to just clear the queue and patch the correct animation every time if that is possible. Here is my current fix:
I also decreased the wait between one intermediate animation and the next to avoid the last moments of the ease
Thanks again for the great project.