1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 23:28:06 +02:00

[api-major] Completely remove the global PDFJS object

This commit is contained in:
Jonas Jenwald 2018-02-17 23:51:24 +01:00
parent 4b4fcecf70
commit b8606abbc1
18 changed files with 323 additions and 426 deletions

View file

@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-unused-vars */
import {
AnnotationLayerBuilder, DefaultAnnotationLayerFactory
@ -25,31 +26,28 @@ import { DownloadManager } from './download_manager.js';
import { GenericL10n } from './genericl10n.js';
import { PDFFindController } from './pdf_find_controller.js';
import { PDFHistory } from './pdf_history.js';
import pdfjsLib from './pdfjs.js';
import { PDFPageView } from './pdf_page_view.js';
import { PDFSinglePageViewer } from './pdf_single_page_viewer';
import { PDFViewer } from './pdf_viewer.js';
let { PDFJS, } = pdfjsLib;
PDFJS.PDFViewer = PDFViewer;
PDFJS.PDFSinglePageViewer = PDFSinglePageViewer;
PDFJS.PDFPageView = PDFPageView;
PDFJS.PDFLinkService = PDFLinkService;
PDFJS.SimpleLinkService = SimpleLinkService;
PDFJS.TextLayerBuilder = TextLayerBuilder;
PDFJS.DefaultTextLayerFactory = DefaultTextLayerFactory;
PDFJS.AnnotationLayerBuilder = AnnotationLayerBuilder;
PDFJS.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory;
PDFJS.PDFHistory = PDFHistory;
PDFJS.PDFFindController = PDFFindController;
PDFJS.EventBus = EventBus;
PDFJS.DownloadManager = DownloadManager;
PDFJS.ProgressBar = ProgressBar;
PDFJS.GenericL10n = GenericL10n;
PDFJS.NullL10n = NullL10n;
const pdfjsVersion = PDFJSDev.eval('BUNDLE_VERSION');
const pdfjsBuild = PDFJSDev.eval('BUNDLE_BUILD');
export {
PDFJS,
PDFViewer,
PDFSinglePageViewer,
PDFPageView,
PDFLinkService,
SimpleLinkService,
TextLayerBuilder,
DefaultTextLayerFactory,
AnnotationLayerBuilder,
DefaultAnnotationLayerFactory,
PDFHistory,
PDFFindController,
EventBus,
DownloadManager,
ProgressBar,
GenericL10n,
NullL10n,
};