add another hackity hack to detect font loaded-ness
This commit is contained in:
parent
29d0d8a8a9
commit
a564076b22
4 changed files with 108 additions and 108 deletions
|
@ -125,14 +125,7 @@ var PDFViewer = {
|
|||
var fonts = [];
|
||||
page.compile(gfx, fonts);
|
||||
|
||||
var loadFont = function() {
|
||||
if (!FontLoader.bind(fonts)) {
|
||||
pageTimeout = window.setTimeout(loadFont, 10);
|
||||
return;
|
||||
}
|
||||
page.display(gfx);
|
||||
}
|
||||
loadFont();
|
||||
FontLoader.bind(fonts, function() { page.display(gfx); });
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -194,17 +187,10 @@ var PDFViewer = {
|
|||
var fonts = [];
|
||||
page.compile(gfx, fonts);
|
||||
|
||||
var loadFont = function() {
|
||||
if (!FontLoader.bind(fonts)) {
|
||||
pageTimeout = window.setTimeout(loadFont, 10);
|
||||
return;
|
||||
}
|
||||
page.display(gfx);
|
||||
}
|
||||
loadFont();
|
||||
FontLoader.bind(fonts, function() { page.display(gfx); });
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
changeScale: function(num) {
|
||||
while (PDFViewer.element.hasChildNodes()) {
|
||||
PDFViewer.element.removeChild(PDFViewer.element.firstChild);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue