mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 01:35:43 +02:00
Change the scrollMode
/spreadMode
to "private" properties on BaseViewer
instances
This commit is contained in:
parent
a9a93bd923
commit
9515f579c6
2 changed files with 14 additions and 14 deletions
|
@ -162,8 +162,8 @@ class BaseViewer {
|
|||
this.useOnlyCssZoom = options.useOnlyCssZoom || false;
|
||||
this.maxCanvasPixels = options.maxCanvasPixels;
|
||||
this.l10n = options.l10n || NullL10n;
|
||||
this.scrollMode = options.scrollMode || ScrollMode.VERTICAL;
|
||||
this.spreadMode = options.spreadMode || SpreadMode.NONE;
|
||||
this._scrollMode = options.scrollMode || ScrollMode.VERTICAL;
|
||||
this._spreadMode = options.spreadMode || SpreadMode.NONE;
|
||||
|
||||
this.defaultRenderingQueue = !options.renderingQueue;
|
||||
if (this.defaultRenderingQueue) {
|
||||
|
@ -181,7 +181,7 @@ class BaseViewer {
|
|||
if (this.removePageBorders) {
|
||||
this.viewer.classList.add('removePageBorders');
|
||||
}
|
||||
if (this.scrollMode !== ScrollMode.VERTICAL) {
|
||||
if (this._scrollMode !== ScrollMode.VERTICAL) {
|
||||
this._updateScrollModeClasses();
|
||||
}
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ class BaseViewer {
|
|||
bindOnAfterAndBeforeDraw(pageView);
|
||||
this._pages.push(pageView);
|
||||
}
|
||||
if (this.spreadMode !== SpreadMode.NONE) {
|
||||
if (this._spreadMode !== SpreadMode.NONE) {
|
||||
this._regroupSpreads();
|
||||
}
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ class BaseViewer {
|
|||
if (!Number.isInteger(mode) || !Object.values(ScrollMode).includes(mode)) {
|
||||
throw new Error(`Invalid scroll mode: ${mode}`);
|
||||
}
|
||||
this.scrollMode = mode;
|
||||
this._scrollMode = mode;
|
||||
}
|
||||
|
||||
_updateScrollModeClasses() {
|
||||
|
@ -1038,7 +1038,7 @@ class BaseViewer {
|
|||
if (!Number.isInteger(mode) || !Object.values(SpreadMode).includes(mode)) {
|
||||
throw new Error(`Invalid spread mode: ${mode}`);
|
||||
}
|
||||
this.spreadMode = mode;
|
||||
this._spreadMode = mode;
|
||||
}
|
||||
|
||||
_regroupSpreads() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue