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