mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-24 17:05:47 +02:00
Make sure the thumbnails positions are recomputed after a structural change but after a reflow has been done (bug 2028193)
This commit is contained in:
parent
f8d7c20a1a
commit
1b2e98f3ce
@ -707,7 +707,7 @@ class PDFThumbnailViewer {
|
|||||||
pagesMapper.movePages(selectedPages, pagesToMove, newIndex);
|
pagesMapper.movePages(selectedPages, pagesToMove, newIndex);
|
||||||
|
|
||||||
this.#updateCurrentPage(this.#updateThumbnails(currentPageNumber));
|
this.#updateCurrentPage(this.#updateThumbnails(currentPageNumber));
|
||||||
this.#computeThumbnailsPosition();
|
this.#thumbnailsPositions = null;
|
||||||
|
|
||||||
selectedPages.clear();
|
selectedPages.clear();
|
||||||
this.#pageNumberToRemove = NaN;
|
this.#pageNumberToRemove = NaN;
|
||||||
@ -920,7 +920,7 @@ class PDFThumbnailViewer {
|
|||||||
pagesMapper.pastePages(index);
|
pagesMapper.pastePages(index);
|
||||||
this.#updateThumbnails(currentPageNumber);
|
this.#updateThumbnails(currentPageNumber);
|
||||||
this.#updateCurrentPage(index + 1, /* forceFocus = */ true);
|
this.#updateCurrentPage(index + 1, /* forceFocus = */ true);
|
||||||
this.#computeThumbnailsPosition();
|
this.#thumbnailsPositions = null;
|
||||||
|
|
||||||
this.eventBus.dispatch("pagesedited", {
|
this.eventBus.dispatch("pagesedited", {
|
||||||
source: this,
|
source: this,
|
||||||
@ -956,6 +956,8 @@ class PDFThumbnailViewer {
|
|||||||
|
|
||||||
pagesMapper.deletePages(pagesToDelete);
|
pagesMapper.deletePages(pagesToDelete);
|
||||||
this.#updateCurrentPage(this.#updateThumbnails(currentPageNumber));
|
this.#updateCurrentPage(this.#updateThumbnails(currentPageNumber));
|
||||||
|
this.#thumbnailsPositions = null;
|
||||||
|
|
||||||
selectedPages.clear();
|
selectedPages.clear();
|
||||||
this.#updateMenuEntries();
|
this.#updateMenuEntries();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user