Skip to content

Commit d3e04d2

Browse files
Merge pull request #20798 from calixteman/bug2016437
Fix the position of the thumbnails on the last line (bug 2016437)
2 parents 01bc76e + 7f76a11 commit d3e04d2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

web/pdf_thumbnail_viewer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -898,11 +898,6 @@ class PDFThumbnailViewer {
898898
firstRightX ??= prevX + w;
899899
positionsX.push(prevX);
900900
}
901-
if (reminder > 0 && i >= ii - reminder) {
902-
const cx = x + w / 2;
903-
positionsLastX.push(cx);
904-
lastRightX ??= cx + w;
905-
}
906901
if (y > prevY) {
907902
if (reminder === -1 && positionsX.length > 1) {
908903
reminder = ii % positionsX.length;
@@ -911,6 +906,11 @@ class PDFThumbnailViewer {
911906
firstBottomY ??= prevY + h;
912907
positionsY.push(prevY);
913908
}
909+
if (reminder > 0 && i >= ii - reminder) {
910+
const cx = x + w / 2;
911+
positionsLastX.push(cx);
912+
lastRightX ??= cx + w;
913+
}
914914
}
915915
const space =
916916
positionsX.length > 1

0 commit comments

Comments
 (0)