mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Refactor PDFAttachmentView to be more class-like and to separate functionality into methods
This commit is contained in:
parent
b17da309ed
commit
ea1d37eb0d
2 changed files with 55 additions and 39 deletions
|
@ -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 &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue