mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Move the sidebar toggleButton
event listener into PDFSidebar
This is consistent with other functionality, such as e.g. `SecondaryToolbar` and `PDFFindBar`.
This commit is contained in:
parent
fbe8c6127c
commit
04a3dc65e4
2 changed files with 4 additions and 4 deletions
|
@ -1654,10 +1654,6 @@ function webViewerInitialized() {
|
|||
}
|
||||
}, true);
|
||||
|
||||
appConfig.sidebar.toggleButton.addEventListener('click', function() {
|
||||
PDFViewerApplication.pdfSidebar.toggle();
|
||||
});
|
||||
|
||||
try {
|
||||
webViewerOpenFileViaURL(file);
|
||||
} catch (reason) {
|
||||
|
|
|
@ -390,6 +390,10 @@ class PDFSidebar {
|
|||
}
|
||||
});
|
||||
|
||||
this.toggleButton.addEventListener('click', () => {
|
||||
this.toggle();
|
||||
});
|
||||
|
||||
// Buttons for switching views.
|
||||
this.thumbnailButton.addEventListener('click', () => {
|
||||
this.switchView(SidebarView.THUMBS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue