Browse Source

Properly disable presentation mode when the viewer is embedded

Jonas 12 years ago
parent
commit
3cce7be9ce
  1. 7
      web/viewer.js

7
web/viewer.js

@ -400,6 +400,10 @@ var PDFView = { @@ -400,6 +400,10 @@ var PDFView = {
document.mozFullScreenEnabled === false ||
document.webkitFullscreenEnabled === false ) {
support = false;
} else if (this.isViewerEmbedded) {
// Need to check if the viewer is embedded as well, to prevent issues with
// presentation mode when the viewer is embedded in '<object>' tags.
support = false;
}
Object.defineProperty(this, 'supportsFullscreen', { value: support,
@ -1392,6 +1396,9 @@ var PDFView = { @@ -1392,6 +1396,9 @@ var PDFView = {
},
presentationMode: function pdfViewPresentationMode() {
if (!this.supportsFullscreen) {
return false;
}
var isPresentationMode = document.fullscreenElement ||
document.mozFullScreen ||
document.webkitIsFullScreen;

Loading…
Cancel
Save