Merge pull request #11062 from Snuffleupagus/misc-viewer-cleanup

Miscellaneous small clean-up of code in the `web/` folder
This commit is contained in:
Tim van der Meij 2019-08-11 13:48:35 +02:00 committed by GitHub
commit 85acc9acac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -236,11 +236,6 @@ let PDFViewerApplication = {
if ('verbosity' in hashParams) { if ('verbosity' in hashParams) {
AppOptions.set('verbosity', hashParams['verbosity'] | 0); 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) { if ('textlayer' in hashParams) {
switch (hashParams['textlayer']) { switch (hashParams['textlayer']) {
case 'off': case 'off':
@ -1654,10 +1649,6 @@ function webViewerInitialized() {
} }
}, true); }, true);
appConfig.sidebar.toggleButton.addEventListener('click', function() {
PDFViewerApplication.pdfSidebar.toggle();
});
try { try {
webViewerOpenFileViaURL(file); webViewerOpenFileViaURL(file);
} catch (reason) { } catch (reason) {

View File

@ -390,6 +390,10 @@ class PDFSidebar {
} }
}); });
this.toggleButton.addEventListener('click', () => {
this.toggle();
});
// Buttons for switching views. // Buttons for switching views.
this.thumbnailButton.addEventListener('click', () => { this.thumbnailButton.addEventListener('click', () => {
this.switchView(SidebarView.THUMBS); this.switchView(SidebarView.THUMBS);