mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Merge pull request #11728 from Snuffleupagus/PDFDocumentProperties-constructor-props
Remove unnecessary checks from the `PDFDocumentProperties` constructor
This commit is contained in:
commit
f53db81c20
1 changed files with 8 additions and 12 deletions
|
@ -72,25 +72,21 @@ class PDFDocumentProperties {
|
|||
this.l10n = l10n;
|
||||
|
||||
this._reset();
|
||||
// Bind the event listener for the Close button.
|
||||
closeButton.addEventListener("click", this.close.bind(this));
|
||||
|
||||
if (closeButton) {
|
||||
// Bind the event listener for the Close button.
|
||||
closeButton.addEventListener("click", this.close.bind(this));
|
||||
}
|
||||
this.overlayManager.register(
|
||||
this.overlayName,
|
||||
this.container,
|
||||
this.close.bind(this)
|
||||
);
|
||||
|
||||
if (eventBus) {
|
||||
eventBus._on("pagechanging", evt => {
|
||||
this._currentPageNumber = evt.pageNumber;
|
||||
});
|
||||
eventBus._on("rotationchanging", evt => {
|
||||
this._pagesRotation = evt.pagesRotation;
|
||||
});
|
||||
}
|
||||
eventBus._on("pagechanging", evt => {
|
||||
this._currentPageNumber = evt.pageNumber;
|
||||
});
|
||||
eventBus._on("rotationchanging", evt => {
|
||||
this._pagesRotation = evt.pagesRotation;
|
||||
});
|
||||
|
||||
this._isNonMetricLocale = true; // The default viewer locale is 'en-us'.
|
||||
l10n.getLanguage().then(locale => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue