mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #18418 from calixteman/wait_for_rendering
[Editor] Wait for 'pagerendered' to switch to editing mode
This commit is contained in:
commit
b1bf8b4979
1 changed files with 3 additions and 3 deletions
|
@ -2328,9 +2328,9 @@ class PDFViewer {
|
|||
// We must call #switchToEditAnnotationMode unconditionally to ensure that
|
||||
// page is rendered if it's useful or not.
|
||||
const idsToRefresh = this.#switchToEditAnnotationMode();
|
||||
if (isEditing && editId && idsToRefresh) {
|
||||
// We're editing an existing annotation so we must switch to editing
|
||||
// mode when the rendering is done.
|
||||
if (isEditing && idsToRefresh) {
|
||||
// We're editing so we must switch to editing mode when the rendering is
|
||||
// done.
|
||||
this.#cleanupSwitchAnnotationEditorMode();
|
||||
this.#onPageRenderedCallback = ({ pageNumber }) => {
|
||||
idsToRefresh.delete(pageNumber);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue