mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
fix loading indicator
This commit is contained in:
parent
aca390cd48
commit
af67d7a5dd
@ -73,6 +73,7 @@
|
||||
animation: fadein 100ms;
|
||||
}
|
||||
.loading-indicator.active {
|
||||
display: block;
|
||||
-webkit-animation: swing 1.5s ease-in-out 0s infinite alternate none;
|
||||
animation: swing 1.5s ease-in-out 0s infinite alternate none;
|
||||
}
|
||||
|
@ -356,16 +356,16 @@ Viewer.prototype = {
|
||||
if (this.pages_loading[idx])
|
||||
return; // Page is already loading
|
||||
|
||||
var new_loading_indicator = this.loading_indicator.cloneNode();
|
||||
new_loading_indicator.classList.add('active');
|
||||
|
||||
var cur_page_ele = cur_page.page;
|
||||
cur_page_ele.appendChild(new_loading_indicator);
|
||||
|
||||
var url = cur_page_ele.getAttribute('data-page-url');
|
||||
if (url) {
|
||||
this.pages_loading[idx] = true; // set semaphore
|
||||
|
||||
// add a copy of the loading indicator
|
||||
var new_loading_indicator = this.loading_indicator.cloneNode();
|
||||
new_loading_indicator.classList.add('active');
|
||||
cur_page_ele.appendChild(new_loading_indicator);
|
||||
|
||||
// load data
|
||||
{
|
||||
var self = this;
|
||||
|
Loading…
Reference in New Issue
Block a user