1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #15414 from Snuffleupagus/mv-PDFViewer

Remove the abstract `BaseViewer`-class
This commit is contained in:
Tim van der Meij 2022-09-10 13:37:04 +02:00 committed by GitHub
commit f63d584cb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 2268 additions and 2272 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,37 @@
/* Copyright 2014 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ScrollMode, SpreadMode } from "./ui_utils.js";
import { PDFViewer } from "./pdf_viewer.js";
class PDFSinglePageViewer extends PDFViewer {
_resetView() {
super._resetView();
this._scrollMode = ScrollMode.PAGE;
this._spreadMode = SpreadMode.NONE;
}
// eslint-disable-next-line accessor-pairs
set scrollMode(mode) {}
_updateScrollMode() {}
// eslint-disable-next-line accessor-pairs
set spreadMode(mode) {}
_updateSpreadMode() {}
}
export { PDFSinglePageViewer };

View file

@ -31,7 +31,6 @@ import {
ScrollMode,
SpreadMode,
} from "./ui_utils.js";
import { PDFSinglePageViewer, PDFViewer } from "./pdf_viewer.js";
import { AnnotationLayerBuilder } from "./annotation_layer_builder.js";
import { DownloadManager } from "./download_manager.js";
import { EventBus } from "./event_utils.js";
@ -41,6 +40,8 @@ import { PDFFindController } from "./pdf_find_controller.js";
import { PDFHistory } from "./pdf_history.js";
import { PDFPageView } from "./pdf_page_view.js";
import { PDFScriptingManager } from "./pdf_scripting_manager.js";
import { PDFSinglePageViewer } from "./pdf_single_page_viewer.js";
import { PDFViewer } from "./pdf_viewer.js";
import { StructTreeLayerBuilder } from "./struct_tree_layer_builder.js";
import { TextLayerBuilder } from "./text_layer_builder.js";
import { XfaLayerBuilder } from "./xfa_layer_builder.js";

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,7 @@
import { ScrollMode, SpreadMode } from "./ui_utils.js";
import { CursorTool } from "./pdf_cursor_tools.js";
import { PagesCountLimit } from "./base_viewer.js";
import { PagesCountLimit } from "./pdf_viewer.js";
/**
* @typedef {Object} SecondaryToolbarOptions