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() { async _initializeViewerComponents() {
const { appConfig, externalServices } = this; const { appConfig, externalServices } = this;
let eventBus; const eventBus = externalServices.isInAutomation
if (appConfig.eventBus) { ? new AutomationEventBus()
eventBus = appConfig.eventBus; : new EventBus();
} else if (externalServices.isInAutomation) {
eventBus = new AutomationEventBus();
} else {
eventBus = new EventBus();
}
this.eventBus = eventBus; this.eventBus = eventBus;
this.overlayManager = new OverlayManager(); this.overlayManager = new OverlayManager();

View File

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