Removes PresentationMode dependency from PDFViewer

This commit is contained in:
Yury Delendik 2014-09-15 12:37:03 -05:00
parent a06a974f78
commit fbd7eedce8
4 changed files with 53 additions and 19 deletions

View file

@ -21,7 +21,7 @@
PasswordPrompt, PresentationMode, HandTool, Promise,
DocumentProperties, DocumentOutlineView, DocumentAttachmentsView,
OverlayManager, PDFFindController, PDFFindBar, getVisibleElements,
watchScroll, PDFViewer, PDFRenderingQueue */
watchScroll, PDFViewer, PDFRenderingQueue, PresentationModeState */
'use strict';
@ -1668,6 +1668,14 @@ document.addEventListener('pagerendered', function (e) {
thumbnailView.setImage(pageView.canvas);
}, true);
window.addEventListener('presentationmodechanged', function (e) {
var active = e.detail.active;
var switchInProgress = e.detail.switchInProgress;
PDFView.pdfViewer.presentationModeState =
switchInProgress ? PresentationModeState.CHANGING :
active ? PresentationModeState.FULLSCREEN : PresentationModeState.NORMAL;
});
function updateViewarea() {
if (!PDFView.initialized) {
return;