Merge pull request #5525 from Snuffleupagus/disableFullscreen
Disable PresentationMode for certain problematic configurations
This commit is contained in:
commit
72cfa36b06
@ -44,7 +44,7 @@ PDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);
|
|||||||
*/
|
*/
|
||||||
PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
|
PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* By default fonts are converted to OpenType fonts and loaded via font face
|
* By default fonts are converted to OpenType fonts and loaded via font face
|
||||||
* rules. If disabled, the font will be rendered using a built in font renderer
|
* rules. If disabled, the font will be rendered using a built in font renderer
|
||||||
* that constructs the glyphs with primitive path commands.
|
* that constructs the glyphs with primitive path commands.
|
||||||
@ -134,6 +134,14 @@ PDFJS.disableCreateObjectURL = (PDFJS.disableCreateObjectURL === undefined ?
|
|||||||
PDFJS.disableWebGL = (PDFJS.disableWebGL === undefined ?
|
PDFJS.disableWebGL = (PDFJS.disableWebGL === undefined ?
|
||||||
true : PDFJS.disableWebGL);
|
true : PDFJS.disableWebGL);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables fullscreen support, and by extension Presentation Mode,
|
||||||
|
* in browsers which support the fullscreen API.
|
||||||
|
* @var {boolean}
|
||||||
|
*/
|
||||||
|
PDFJS.disableFullscreen = (PDFJS.disableFullscreen === undefined ?
|
||||||
|
false : PDFJS.disableFullscreen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables CSS only zooming.
|
* Enables CSS only zooming.
|
||||||
* @var {boolean}
|
* @var {boolean}
|
||||||
|
@ -562,3 +562,13 @@ if (typeof PDFJS === 'undefined') {
|
|||||||
PDFJS.maxCanvasPixels = 5242880;
|
PDFJS.maxCanvasPixels = 5242880;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// Disable fullscreen support for certain problematic configurations.
|
||||||
|
// Support: IE11+ (when embedded).
|
||||||
|
(function checkFullscreenSupport() {
|
||||||
|
var isEmbeddedIE = (navigator.userAgent.indexOf('Trident') >= 0 &&
|
||||||
|
window.parent !== window);
|
||||||
|
if (isEmbeddedIE) {
|
||||||
|
PDFJS.disableFullscreen = true;
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
@ -322,6 +322,9 @@ var PDFViewerApplication = {
|
|||||||
document.msFullscreenEnabled === false) {
|
document.msFullscreenEnabled === false) {
|
||||||
support = false;
|
support = false;
|
||||||
}
|
}
|
||||||
|
if (support && PDFJS.disableFullscreen === true) {
|
||||||
|
support = false;
|
||||||
|
}
|
||||||
|
|
||||||
return PDFJS.shadow(this, 'supportsFullscreen', support);
|
return PDFJS.shadow(this, 'supportsFullscreen', support);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user