Merge pull request #14192 from Snuffleupagus/pr-14158-followup
[Regression] Prevent breaking errors when opening a new document in the GENERIC viewer (PR 14158 follow-up)
This commit is contained in:
commit
f3a0a506c0
@ -1361,10 +1361,10 @@ class BaseViewer {
|
|||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
#getScrollAhead(views) {
|
#getScrollAhead(visible) {
|
||||||
if (views.first.id === 1) {
|
if (visible.first?.id === 1) {
|
||||||
return true;
|
return true;
|
||||||
} else if (views.last.id === this.pagesCount) {
|
} else if (visible.last?.id === this.pagesCount) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch (this._scrollMode) {
|
switch (this._scrollMode) {
|
||||||
|
@ -295,10 +295,10 @@ class PDFThumbnailViewer {
|
|||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
#getScrollAhead(views) {
|
#getScrollAhead(visible) {
|
||||||
if (views.first.id === 1) {
|
if (visible.first?.id === 1) {
|
||||||
return true;
|
return true;
|
||||||
} else if (views.last.id === this._thumbnails.length) {
|
} else if (visible.last?.id === this._thumbnails.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return this.scroll.down;
|
return this.scroll.down;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user