[Pkg-javascript-commits] [pdf.js] 385/414: Expose a few non-classes on `PDFViewerApplication`
David Prévot
taffit at moszumanska.debian.org
Tue Jun 28 17:12:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 9dfda2b90813f02ae248af03265ccfe84d1503e6
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sat Apr 16 11:26:10 2016 +0200
Expose a few non-classes on `PDFViewerApplication`
With the recent PR 7172, which made the viewer modular, there's now a couple of modules that are no longer easily accessible (e.g. through the console).
This can make testing/debugging more difficult, and means that e.g. https://github.com/mozilla/pdf.js/wiki/Debugging-PDF.js#enabling no longer works in the generic viewer.
For now, as a simple solution, this patch just exposes those non-classes on `PDFViewerApplication` to ensure that they are available, and to avoid polluting the `window` scope.
---
web/app.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/web/app.js b/web/app.js
index 9d03cc2..0b8fc10 100644
--- a/web/app.js
+++ b/web/app.js
@@ -192,6 +192,7 @@ var PDFViewerApplication = {
pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);
Preferences.initialize();
+ this.preferences = Preferences;
this.pdfHistory = new PDFHistory({
linkService: pdfLinkService
@@ -220,10 +221,13 @@ var PDFViewerApplication = {
this.findController.setFindBar(this.findBar);
+ this.overlayManager = OverlayManager;
+
HandTool.initialize({
container: container,
toggleHandTool: document.getElementById('toggleHandTool')
});
+ this.handTool = HandTool;
this.pdfDocumentProperties = new PDFDocumentProperties({
overlayName: 'documentPropertiesOverlay',
@@ -259,6 +263,7 @@ var PDFViewerApplication = {
pageRotateCcw: document.getElementById('pageRotateCcw'),
documentPropertiesButton: document.getElementById('documentProperties')
});
+ this.secondaryToolbar = SecondaryToolbar;
if (this.supportsFullscreen) {
var toolbar = SecondaryToolbar;
@@ -286,6 +291,7 @@ var PDFViewerApplication = {
passwordSubmit: document.getElementById('passwordSubmit'),
passwordCancel: document.getElementById('passwordCancel')
});
+ this.passwordPrompt = PasswordPrompt;
this.pdfOutlineViewer = new PDFOutlineViewer({
container: document.getElementById('outlineView'),
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list