Move PDFSinglePageViewer
into the web/pdf_viewer.js
file
With the previous commit, both of the `PDFViewer` and `PDFSinglePageViewer` clases are now small/simple enough that it no longer seems necessary to keep them in separate files.
This commit is contained in:
parent
511458fbbc
commit
e1a2e916e8
@ -1,37 +0,0 @@
|
||||
/* Copyright 2017 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 { BaseViewer } from "./base_viewer.js";
|
||||
|
||||
class PDFSinglePageViewer extends BaseViewer {
|
||||
_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,6 +31,7 @@ import {
|
||||
} from "./xfa_layer_builder.js";
|
||||
import { EventBus, ProgressBar } from "./ui_utils.js";
|
||||
import { PDFLinkService, SimpleLinkService } from "./pdf_link_service.js";
|
||||
import { PDFSinglePageViewer, PDFViewer } from "./pdf_viewer.js";
|
||||
import { DownloadManager } from "./download_manager.js";
|
||||
import { GenericL10n } from "./genericl10n.js";
|
||||
import { NullL10n } from "./l10n_utils.js";
|
||||
@ -38,8 +39,6 @@ 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";
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const pdfjsVersion = PDFJSDev.eval("BUNDLE_VERSION");
|
||||
|
@ -13,8 +13,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ScrollMode, SpreadMode } from "./ui_utils.js";
|
||||
import { BaseViewer } from "./base_viewer.js";
|
||||
|
||||
class PDFViewer extends BaseViewer {}
|
||||
|
||||
export { PDFViewer };
|
||||
class PDFSinglePageViewer extends BaseViewer {
|
||||
_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, PDFViewer };
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import { SCROLLBAR_PADDING, ScrollMode, SpreadMode } from "./ui_utils.js";
|
||||
import { CursorTool } from "./pdf_cursor_tools.js";
|
||||
import { PDFSinglePageViewer } from "./pdf_single_page_viewer.js";
|
||||
import { PDFSinglePageViewer } from "./pdf_viewer.js";
|
||||
|
||||
/**
|
||||
* @typedef {Object} SecondaryToolbarOptions
|
||||
|
Loading…
x
Reference in New Issue
Block a user