Open pdeva opened 10 years ago
Yap is posible use Pace.start() and Pace.stop() read pace documentation http://github.hubspot.com/pace/
I did a Pace.stop()
then I call the following function:
function jumpToAnchor(h) {
// Save down the URL without hash.
var url = location.href;
// Go to the target element.
location.href = '#'+h;
// Don't like hashes. Changing it back.
history.replaceState(null, null, url);
}
and it pace still runs. also tied ignoring, alas the same result.
Pace.ignore(jumpToAnchor, 'myanchor');
\ On pace 0.5.1 **
I try to call Pace.stop() after a 2-3 sec timeout so that the file Upload look more "real" (else it's so fast) but it seems like pace stops already by itself when the file is done uploading before hitting Pace.stop() :( any ideas?
For me Pace.stop() is not working. It doesn't hide progress bar immediately and still keeps to load next elements.
+1
Lähetetty Honor-matkapuhelimestani-------- Alkuperäinen viesti --------Aihe: Re: [pace] allow manually starting stopping (#129)Lähettäjä: Xavier Artot Vastaanottaja: HubSpot/pace Kopio: +1
—Reply to this email directly or view it on GitHub.
In my case Doing a Pace.stop() + Pace.start() will show the loader. But it will automatically hide itself :(
I post this for who will looking to open it manual later.
Manual start.
Pace.stop();
Pace.bar.render();
For manual stop just use Pace.stop();
and if you want to revert it back, just stop then run Pace.start();
For me, I use this code for make page seemless when change page.
window.onbeforeunload = renderLoading;
function renderLoading()
{
Pace.stop()
Pace.bar.render();
}
My solution for running completely manual is chage a line of source code:
return animation = runAnimation(function (frameTime, enqueueNextFrame) { var avg, count, done, element, elements, i, j, remaining, scaler, scalerList, sum, _j, _k, _len1, _len2, _ref2; remaining = 100 - bar.progress; count = sum = 0; done = false; //change from true to false. So only stops on Pace.stop()
+1
Need to prevent pace from automatically starting at the beginning.
Pace.stop() still allows pace to run a few milliseconds.
I had to force the progress bar to track my ajax call.
Pace.track(function(){
$.ajax(...)
});
Make sure async: true
in ajax call.
i would like to be able to manually start/stop showing the loading animation on a div and manually pass in 'percentage'. it seems currently everything is only handled automagically