mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Attempt to simplify the signature of the PDFSidebar
constructor, by moving the eventBus
parameter from the options
object and removing the PDFOutlineViewer
dependency
This is similar to the format used by a number of other viewer components, and should simplify the `PDFSidebar` initialization slightly. Furthermore, by using the `eventBus` it's no longer necessary for `PDFSidebar` to have a direct dependency on `PDFOutlineViewer`. There's still room for improvement here, but this patch is at least a start (since it's not clear to me how best to handle the viewers).
This commit is contained in:
parent
3f3ddaf541
commit
8eda8c27f8
3 changed files with 7 additions and 9 deletions
|
@ -39,6 +39,8 @@ class PDFOutlineViewer {
|
|||
this.eventBus = eventBus;
|
||||
|
||||
this.reset();
|
||||
|
||||
eventBus.on('toggleoutlinetree', this.toggleOutlineTree.bind(this));
|
||||
}
|
||||
|
||||
reset() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue