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
@ -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…
Reference in New Issue
Block a user