mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Takes clientTop in account in getVisibleElements
This commit is contained in:
parent
0e14f0ccae
commit
7b2441ec23
1 changed files with 2 additions and 2 deletions
|
@ -1608,7 +1608,7 @@ var PDFView = {
|
|||
|
||||
for (var i = 1, ii = views.length; i <= ii; ++i) {
|
||||
view = views[i - 1];
|
||||
currentHeight = view.el.offsetTop;
|
||||
currentHeight = view.el.offsetTop + view.el.clientTop;
|
||||
if (currentHeight + view.el.clientHeight > top)
|
||||
break;
|
||||
currentHeight += view.el.clientHeight;
|
||||
|
@ -1632,7 +1632,7 @@ var PDFView = {
|
|||
for (; i <= ii && currentHeight < bottom; ++i) {
|
||||
view = views[i - 1];
|
||||
viewHeight = view.el.clientHeight;
|
||||
currentHeight = view.el.offsetTop;
|
||||
currentHeight = view.el.offsetTop + view.el.clientTop;
|
||||
nextHeight = currentHeight + viewHeight;
|
||||
hidden = Math.max(0, top - currentHeight) +
|
||||
Math.max(0, nextHeight - bottom);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue