File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -401,7 +401,13 @@ class AnnotationElement {
401
401
for ( const [ actionName , detail ] of Object . entries ( storedData ) ) {
402
402
const action = commonActions [ actionName ] ;
403
403
if ( action ) {
404
- action ( { detail, target : element } ) ;
404
+ const eventProxy = {
405
+ detail : {
406
+ [ actionName ] : detail ,
407
+ } ,
408
+ target : element ,
409
+ } ;
410
+ action ( eventProxy ) ;
405
411
// The action has been consumed: no need to keep it.
406
412
delete storedData [ actionName ] ;
407
413
}
Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ class PDFPageView {
235
235
try {
236
236
await this . annotationLayer . render ( this . viewport , "display" ) ;
237
237
} catch ( ex ) {
238
+ console . error ( `_renderAnnotationLayer: "${ ex } ".` ) ;
238
239
error = ex ;
239
240
} finally {
240
241
this . eventBus . dispatch ( "annotationlayerrendered" , {
@@ -253,6 +254,7 @@ class PDFPageView {
253
254
try {
254
255
await this . annotationEditorLayer . render ( this . viewport , "display" ) ;
255
256
} catch ( ex ) {
257
+ console . error ( `_renderAnnotationEditorLayer: "${ ex } ".` ) ;
256
258
error = ex ;
257
259
} finally {
258
260
this . eventBus . dispatch ( "annotationeditorlayerrendered" , {
@@ -274,6 +276,7 @@ class PDFPageView {
274
276
this . _buildXfaTextContentItems ( result . textDivs ) ;
275
277
}
276
278
} catch ( ex ) {
279
+ console . error ( `_renderXfaLayer: "${ ex } ".` ) ;
277
280
error = ex ;
278
281
} finally {
279
282
this . eventBus . dispatch ( "xfalayerrendered" , {
@@ -843,12 +846,10 @@ class PDFPageView {
843
846
) ;
844
847
845
848
if ( this . xfaLayerFactory ) {
846
- if ( ! this . xfaLayer ) {
847
- this . xfaLayer = this . xfaLayerFactory . createXfaLayerBuilder ( {
848
- pageDiv : div ,
849
- pdfPage,
850
- } ) ;
851
- }
849
+ this . xfaLayer ||= this . xfaLayerFactory . createXfaLayerBuilder ( {
850
+ pageDiv : div ,
851
+ pdfPage,
852
+ } ) ;
852
853
this . _renderXfaLayer ( ) ;
853
854
}
854
855
You can’t perform that action at this time.
0 commit comments