Merge pull request #15414 from Snuffleupagus/mv-PDFViewer
Remove the abstract `BaseViewer`-class
This commit is contained in:
commit
f63d584cb1
@ -9,7 +9,6 @@
|
||||
"annotation_spec.js",
|
||||
"annotation_storage_spec.js",
|
||||
"api_spec.js",
|
||||
"base_viewer_spec.js",
|
||||
"bidi_spec.js",
|
||||
"cff_parser_spec.js",
|
||||
"cmap_spec.js",
|
||||
@ -35,6 +34,7 @@
|
||||
"pdf_find_controller_spec.js",
|
||||
"pdf_find_utils_spec.js",
|
||||
"pdf_history_spec.js",
|
||||
"pdf_viewer_spec.js",
|
||||
"primitives_spec.js",
|
||||
"stream_spec.js",
|
||||
"struct_tree_spec.js",
|
||||
|
@ -54,7 +54,6 @@ async function initializePDFJS(callback) {
|
||||
"pdfjs-test/unit/annotation_spec.js",
|
||||
"pdfjs-test/unit/annotation_storage_spec.js",
|
||||
"pdfjs-test/unit/api_spec.js",
|
||||
"pdfjs-test/unit/base_viewer_spec.js",
|
||||
"pdfjs-test/unit/bidi_spec.js",
|
||||
"pdfjs-test/unit/cff_parser_spec.js",
|
||||
"pdfjs-test/unit/cmap_spec.js",
|
||||
@ -81,6 +80,7 @@ async function initializePDFJS(callback) {
|
||||
"pdfjs-test/unit/pdf_find_controller_spec.js",
|
||||
"pdfjs-test/unit/pdf_find_utils_spec.js",
|
||||
"pdfjs-test/unit/pdf_history_spec.js",
|
||||
"pdfjs-test/unit/pdf_viewer_spec.js",
|
||||
"pdfjs-test/unit/primitives_spec.js",
|
||||
"pdfjs-test/unit/scripting_spec.js",
|
||||
"pdfjs-test/unit/stream_spec.js",
|
||||
|
@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { PDFPageViewBuffer } from "../../web/base_viewer.js";
|
||||
import { PDFPageViewBuffer } from "../../web/pdf_viewer.js";
|
||||
|
||||
describe("BaseViewer", function () {
|
||||
describe("PDFViewer", function () {
|
||||
describe("PDFPageViewBuffer", function () {
|
||||
function createViewsMap(startId, endId) {
|
||||
const map = new Map();
|
2252
web/base_viewer.js
2252
web/base_viewer.js
File diff suppressed because it is too large
Load Diff
37
web/pdf_single_page_viewer.js
Normal file
37
web/pdf_single_page_viewer.js
Normal 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 };
|
@ -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";
|
||||
|
2238
web/pdf_viewer.js
2238
web/pdf_viewer.js
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user