mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 01:35:43 +02:00
Merge pull request #14096 from Snuffleupagus/spreadMode-preRender
Pre-render *one* additional page when spreadModes are enabled
This commit is contained in:
commit
dedff3c982
2 changed files with 23 additions and 16 deletions
|
@ -1250,10 +1250,16 @@ class BaseViewer {
|
|||
const scrollAhead = this._isScrollModeHorizontal
|
||||
? this.scroll.right
|
||||
: this.scroll.down;
|
||||
const preRenderExtra =
|
||||
this._scrollMode === ScrollMode.VERTICAL &&
|
||||
this._spreadMode !== SpreadMode.NONE &&
|
||||
!this.isInPresentationMode;
|
||||
|
||||
const pageView = this.renderingQueue.getHighestPriority(
|
||||
visiblePages,
|
||||
this._pages,
|
||||
scrollAhead
|
||||
scrollAhead,
|
||||
preRenderExtra
|
||||
);
|
||||
if (pageView) {
|
||||
this._ensurePdfPageLoaded(pageView).then(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue