add another hackity hack to detect font loaded-ness

This commit is contained in:
Chris Jones 2011-06-30 02:08:53 -07:00
parent 29d0d8a8a9
commit a564076b22
4 changed files with 108 additions and 108 deletions

View file

@ -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);