Merge pull request #14423 from Snuffleupagus/rm-getViewerConfiguration-eventBus

Remove the `eventBus` parameter from `getViewerConfiguration`
This commit is contained in:
Tim van der Meij 2022-01-08 13:02:02 +01:00 committed by GitHub
commit 8cf0a8c357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions

View File

@ -463,14 +463,9 @@ const PDFViewerApplication = {
async _initializeViewerComponents() {
const { appConfig, externalServices } = this;
let eventBus;
if (appConfig.eventBus) {
eventBus = appConfig.eventBus;
} else if (externalServices.isInAutomation) {
eventBus = new AutomationEventBus();
} else {
eventBus = new EventBus();
}
const eventBus = externalServices.isInAutomation
? new AutomationEventBus()
: new EventBus();
this.eventBus = eventBus;
this.overlayManager = new OverlayManager();

View File

@ -77,7 +77,6 @@ function getViewerConfiguration() {
appContainer: document.body,
mainContainer: document.getElementById("viewerContainer"),
viewerContainer: document.getElementById("viewer"),
eventBus: null,
toolbar: {
container: document.getElementById("toolbarViewer"),
numPages: document.getElementById("numPages"),