A couple of small BaseViewer
tweaks
- Mark `BaseViewer.initializeScriptingEvents` as an `async` method, since that's actually how it's being used in the default viewer (see `PDFViewerApplication-_initializeJavaScript`). - Change `BaseViewer._pageWidthScaleFactor` to access the *internal* scroll/spread-modes directly, rather than using the getters, since that's consistent with the rest of the code (and not just for these properties).
This commit is contained in:
parent
c79fd71457
commit
48f4580991
@ -740,8 +740,8 @@ class BaseViewer {
|
|||||||
*/
|
*/
|
||||||
get _pageWidthScaleFactor() {
|
get _pageWidthScaleFactor() {
|
||||||
if (
|
if (
|
||||||
this.spreadMode !== SpreadMode.NONE &&
|
this._spreadMode !== SpreadMode.NONE &&
|
||||||
this.scrollMode !== ScrollMode.HORIZONTAL &&
|
this._scrollMode !== ScrollMode.HORIZONTAL &&
|
||||||
!this.isInPresentationMode
|
!this.isInPresentationMode
|
||||||
) {
|
) {
|
||||||
return 2;
|
return 2;
|
||||||
@ -1642,7 +1642,7 @@ class BaseViewer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeScriptingEvents() {
|
async initializeScriptingEvents() {
|
||||||
if (!this.enableScripting || this._pageOpenPendingSet) {
|
if (!this.enableScripting || this._pageOpenPendingSet) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user