diff --git a/web/base_viewer.js b/web/base_viewer.js index 2ff541905..11f5432aa 100644 --- a/web/base_viewer.js +++ b/web/base_viewer.js @@ -1043,18 +1043,7 @@ class BaseViewer { } _updateScrollModeClasses() { - const { scrollMode, viewer, } = this; - - if (scrollMode === ScrollMode.HORIZONTAL) { - viewer.classList.add('scrollHorizontal'); - } else { - viewer.classList.remove('scrollHorizontal'); - } - if (scrollMode === ScrollMode.WRAPPED) { - viewer.classList.add('scrollWrapped'); - } else { - viewer.classList.remove('scrollWrapped'); - } + // No-op in the base class. } setSpreadMode(mode) { @@ -1070,7 +1059,9 @@ class BaseViewer { this._regroupSpreads(); } - _regroupSpreads() {} + _regroupSpreads() { + // No-op in the base class. + } } export { diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js index 99757087d..79c3e055b 100644 --- a/web/pdf_viewer.js +++ b/web/pdf_viewer.js @@ -87,6 +87,21 @@ class PDFViewer extends BaseViewer { }); } + _updateScrollModeClasses() { + const { scrollMode, viewer, } = this; + + if (scrollMode === ScrollMode.HORIZONTAL) { + viewer.classList.add('scrollHorizontal'); + } else { + viewer.classList.remove('scrollHorizontal'); + } + if (scrollMode === ScrollMode.WRAPPED) { + viewer.classList.add('scrollWrapped'); + } else { + viewer.classList.remove('scrollWrapped'); + } + } + _regroupSpreads() { const viewer = this.viewer, pages = this._pages; // Temporarily remove all the pages from the DOM.