File tree 2 files changed +5
-17
lines changed
2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -1479,13 +1479,7 @@ const PDFViewerApplication = {
1479
1479
// It should be *extremely* rare for metadata to not have been resolved
1480
1480
// when this code runs, but ensure that we handle that case here.
1481
1481
await new Promise ( resolve => {
1482
- this . eventBus . _on (
1483
- "metadataloaded" ,
1484
- evt => {
1485
- resolve ( ) ;
1486
- } ,
1487
- { once : true }
1488
- ) ;
1482
+ this . eventBus . _on ( "metadataloaded" , resolve , { once : true } ) ;
1489
1483
} ) ;
1490
1484
if ( pdfDocument !== this . pdfDocument ) {
1491
1485
return ; // The document was closed while the metadata resolved.
@@ -1498,13 +1492,7 @@ const PDFViewerApplication = {
1498
1492
// Hence we'll simply have to trust that the `contentLength` (as provided
1499
1493
// by the server), when it exists, is accurate enough here.
1500
1494
await new Promise ( resolve => {
1501
- this . eventBus . _on (
1502
- "documentloaded" ,
1503
- evt => {
1504
- resolve ( ) ;
1505
- } ,
1506
- { once : true }
1507
- ) ;
1495
+ this . eventBus . _on ( "documentloaded" , resolve , { once : true } ) ;
1508
1496
} ) ;
1509
1497
if ( pdfDocument !== this . pdfDocument ) {
1510
1498
return ; // The document was closed while the downloadInfo resolved.
Original file line number Diff line number Diff line change @@ -740,8 +740,8 @@ class BaseViewer {
740
740
*/
741
741
get _pageWidthScaleFactor ( ) {
742
742
if (
743
- this . spreadMode !== SpreadMode . NONE &&
744
- this . scrollMode !== ScrollMode . HORIZONTAL &&
743
+ this . _spreadMode !== SpreadMode . NONE &&
744
+ this . _scrollMode !== ScrollMode . HORIZONTAL &&
745
745
! this . isInPresentationMode
746
746
) {
747
747
return 2 ;
@@ -1642,7 +1642,7 @@ class BaseViewer {
1642
1642
return true ;
1643
1643
}
1644
1644
1645
- initializeScriptingEvents ( ) {
1645
+ async initializeScriptingEvents ( ) {
1646
1646
if ( ! this . enableScripting || this . _pageOpenPendingSet ) {
1647
1647
return ;
1648
1648
}
You can’t perform that action at this time.
0 commit comments