Merge pull request #11062 from Snuffleupagus/misc-viewer-cleanup
Miscellaneous small clean-up of code in the `web/` folder
This commit is contained in:
commit
85acc9acac
@ -236,11 +236,6 @@ let PDFViewerApplication = {
|
||||
if ('verbosity' in hashParams) {
|
||||
AppOptions.set('verbosity', hashParams['verbosity'] | 0);
|
||||
}
|
||||
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) &&
|
||||
hashParams['disablebcmaps'] === 'true') {
|
||||
AppOptions.set('cMapUrl', '../external/cmaps/');
|
||||
AppOptions.set('cMapPacked', false);
|
||||
}
|
||||
if ('textlayer' in hashParams) {
|
||||
switch (hashParams['textlayer']) {
|
||||
case 'off':
|
||||
@ -1654,10 +1649,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