File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1072,6 +1072,20 @@ class PDFViewer {
10721072 this . _updateSpreadMode ( ) ;
10731073 }
10741074
1075+ eventBus . _on (
1076+ "annotationeditorlayerrendered" ,
1077+ evt => {
1078+ if ( this . #annotationEditorUIManager) {
1079+ // Ensure that the Editor buttons, in the toolbar, are updated.
1080+ eventBus . dispatch ( "annotationeditormodechanged" , {
1081+ source : this ,
1082+ mode : this . #annotationEditorMode,
1083+ } ) ;
1084+ }
1085+ } ,
1086+ { once : true , signal }
1087+ ) ;
1088+
10751089 // Fetch all the pages since the viewport is needed before printing
10761090 // starts to create the correct size canvas. Wait until one page is
10771091 // rendered so we don't tie up too many resources early on.
@@ -1090,14 +1104,6 @@ class PDFViewer {
10901104 ) ;
10911105 }
10921106
1093- if ( this . #annotationEditorUIManager) {
1094- // Ensure that the Editor buttons, in the toolbar, are updated.
1095- eventBus . dispatch ( "annotationeditormodechanged" , {
1096- source : this ,
1097- mode : this . #annotationEditorMode,
1098- } ) ;
1099- }
1100-
11011107 // In addition to 'disableAutoFetch' being set, also attempt to reduce
11021108 // resource usage when loading *very* long/large documents.
11031109 if (
You can’t perform that action at this time.
0 commit comments