mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-20 04:04:03 +02:00
Merge pull request #20798 from calixteman/bug2016437
Fix the position of the thumbnails on the last line (bug 2016437)
This commit is contained in:
commit
d3e04d29ac
@ -898,11 +898,6 @@ class PDFThumbnailViewer {
|
||||
firstRightX ??= prevX + w;
|
||||
positionsX.push(prevX);
|
||||
}
|
||||
if (reminder > 0 && i >= ii - reminder) {
|
||||
const cx = x + w / 2;
|
||||
positionsLastX.push(cx);
|
||||
lastRightX ??= cx + w;
|
||||
}
|
||||
if (y > prevY) {
|
||||
if (reminder === -1 && positionsX.length > 1) {
|
||||
reminder = ii % positionsX.length;
|
||||
@ -911,6 +906,11 @@ class PDFThumbnailViewer {
|
||||
firstBottomY ??= prevY + h;
|
||||
positionsY.push(prevY);
|
||||
}
|
||||
if (reminder > 0 && i >= ii - reminder) {
|
||||
const cx = x + w / 2;
|
||||
positionsLastX.push(cx);
|
||||
lastRightX ??= cx + w;
|
||||
}
|
||||
}
|
||||
const space =
|
||||
positionsX.length > 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user