Refactor PDFAttachmentView to be more class-like and to separate functionality into methods

This commit is contained in:
Tim van der Meij 2015-01-27 22:51:39 +01:00
parent b17da309ed
commit ea1d37eb0d
2 changed files with 55 additions and 39 deletions

View file

@ -966,15 +966,16 @@ var PDFViewerApplication = {
var promises = [pagesPromise, this.animationStartedPromise];
Promise.all(promises).then(function() {
pdfDocument.getOutline().then(function(outline) {
var outlineView = document.getElementById('outlineView');
var container = document.getElementById('outlineView');
self.outline = new PDFOutlineView({
container: container,
outline: outline,
outlineView: outlineView,
linkService: self
});
self.outline.render();
document.getElementById('viewOutline').disabled = !outline;
if (!outline && !outlineView.classList.contains('hidden')) {
if (!outline && !container.classList.contains('hidden')) {
self.switchSidebarView('thumbs');
}
if (outline &&