Fix coding style in page_view.js

This commit is contained in:
Jonas Jenwald 2013-09-20 09:28:03 +02:00
parent cebf3c60e2
commit 2cf2eb0dfc

View File

@ -87,8 +87,9 @@ var PageView = function pageView(container, id, scale,
div.style.width = Math.floor(this.viewport.width) + 'px';
div.style.height = Math.floor(this.viewport.height) + 'px';
while (div.hasChildNodes())
while (div.hasChildNodes()) {
div.removeChild(div.lastChild);
}
div.removeAttribute('data-loaded');
this.annotationLayer = null;
@ -121,8 +122,9 @@ var PageView = function pageView(container, id, scale,
function bindLink(link, dest) {
link.href = PDFView.getDestinationHash(dest);
link.onclick = function pageViewSetupLinksOnclick() {
if (dest)
if (dest) {
PDFView.navigateTo(dest);
}
return false;
};
link.className = 'internalLink';
@ -445,8 +447,9 @@ var PageView = function pageView(container, id, scale,
self.stats = pdfPage.stats;
self.updateStats();
if (self.onAfterDraw)
if (self.onAfterDraw) {
self.onAfterDraw();
}
cache.push(self);
@ -547,10 +550,11 @@ var PageView = function pageView(container, id, scale,
console.error(error);
// Tell the printEngine that rendering this canvas/page has failed.
// This will make the print proces stop.
if ('abort' in obj)
if ('abort' in obj) {
obj.abort();
else
} else {
obj.done();
}
self.pdfPage.destroy();
});
};