Remove the unused mainContainer
parameter from the Toolbar
constructor
Looking at the history of this code, this parameter has never been used. I'm guessing that most likely the code in `web/toolbar.js` began life as a copy of `web/secondary_toolbar.js`, which would probably explain why that parameter exists.
This commit is contained in:
parent
ff2df9c5b6
commit
5d421964e5
@ -311,8 +311,8 @@ let PDFViewerApplication = {
|
|||||||
});
|
});
|
||||||
this.findController = findController;
|
this.findController = findController;
|
||||||
|
|
||||||
let container = appConfig.mainContainer;
|
const container = appConfig.mainContainer;
|
||||||
let viewer = appConfig.viewerContainer;
|
const viewer = appConfig.viewerContainer;
|
||||||
this.pdfViewer = new PDFViewer({
|
this.pdfViewer = new PDFViewer({
|
||||||
container,
|
container,
|
||||||
viewer,
|
viewer,
|
||||||
@ -361,8 +361,7 @@ let PDFViewerApplication = {
|
|||||||
cursorToolOnLoad: AppOptions.get('cursorToolOnLoad'),
|
cursorToolOnLoad: AppOptions.get('cursorToolOnLoad'),
|
||||||
});
|
});
|
||||||
|
|
||||||
this.toolbar = new Toolbar(appConfig.toolbar, container, eventBus,
|
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, this.l10n);
|
||||||
this.l10n);
|
|
||||||
|
|
||||||
this.secondaryToolbar =
|
this.secondaryToolbar =
|
||||||
new SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus);
|
new SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus);
|
||||||
|
@ -49,13 +49,11 @@ const SCALE_SELECT_PADDING = 22;
|
|||||||
class Toolbar {
|
class Toolbar {
|
||||||
/**
|
/**
|
||||||
* @param {ToolbarOptions} options
|
* @param {ToolbarOptions} options
|
||||||
* @param {HTMLDivElement} mainContainer
|
|
||||||
* @param {EventBus} eventBus
|
* @param {EventBus} eventBus
|
||||||
* @param {IL10n} l10n - Localization service.
|
* @param {IL10n} l10n - Localization service.
|
||||||
*/
|
*/
|
||||||
constructor(options, mainContainer, eventBus, l10n = NullL10n) {
|
constructor(options, eventBus, l10n = NullL10n) {
|
||||||
this.toolbar = options.container;
|
this.toolbar = options.container;
|
||||||
this.mainContainer = mainContainer;
|
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.l10n = l10n;
|
this.l10n = l10n;
|
||||||
this.items = options;
|
this.items = options;
|
||||||
|
Loading…
Reference in New Issue
Block a user