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
@ -2328,9 +2328,9 @@ class PDFViewer {
|
|||||||
// We must call #switchToEditAnnotationMode unconditionally to ensure that
|
// We must call #switchToEditAnnotationMode unconditionally to ensure that
|
||||||
// page is rendered if it's useful or not.
|
// page is rendered if it's useful or not.
|
||||||
const idsToRefresh = this.#switchToEditAnnotationMode();
|
const idsToRefresh = this.#switchToEditAnnotationMode();
|
||||||
if (isEditing && editId && idsToRefresh) {
|
if (isEditing && idsToRefresh) {
|
||||||
// We're editing an existing annotation so we must switch to editing
|
// We're editing so we must switch to editing mode when the rendering is
|
||||||
// mode when the rendering is done.
|
// done.
|
||||||
this.#cleanupSwitchAnnotationEditorMode();
|
this.#cleanupSwitchAnnotationEditorMode();
|
||||||
this.#onPageRenderedCallback = ({ pageNumber }) => {
|
this.#onPageRenderedCallback = ({ pageNumber }) => {
|
||||||
idsToRefresh.delete(pageNumber);
|
idsToRefresh.delete(pageNumber);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user