Comment out semi full screen.

d6
Frode Petterson 2015-02-09 11:51:39 +01:00
parent 11d9cb2f35
commit a0c5fe0e18
2 changed files with 36 additions and 36 deletions

View File

@ -84,41 +84,41 @@
} }
}; };
/** // /**
* Enter semi full screen. // * Enter semi full screen.
* Expands the iframe so that it covers the whole page. // * Expands the iframe so that it covers the whole page.
* // *
* @private // * @private
* @param {Object} iframe Element // * @param {Object} iframe Element
* @param {Object} data Payload // * @param {Object} data Payload
* @param {Function} respond Send a response to the iframe // * @param {Function} respond Send a response to the iframe
*/ // */
actionHandlers.fullScreen = function (iframe, data, respond) { // actionHandlers.fullScreen = function (iframe, data, respond) {
iframe.style.position = 'fixed'; // iframe.style.position = 'fixed';
iframe.style.top = iframe.style.left = 0; // iframe.style.top = iframe.style.left = 0;
iframe.style.zIndex = 101; // iframe.style.zIndex = 101;
iframe.style.width = iframe.style.height = '100%'; // iframe.style.width = iframe.style.height = '100%';
document.body.addEventListener('keyup', escape, false); // document.body.addEventListener('keyup', escape, false);
respond('fullScreen'); // respond('fullScreen');
}; // };
//
/** // /**
* Exit semi full screen. // * Exit semi full screen.
* // *
* @private // * @private
* @param {Object} iframe Element // * @param {Object} iframe Element
* @param {Object} data Payload // * @param {Object} data Payload
* @param {Function} respond Send a response to the iframe // * @param {Function} respond Send a response to the iframe
*/ // */
actionHandlers.exitFullScreen = function (iframe, data, respond) { // actionHandlers.exitFullScreen = function (iframe, data, respond) {
iframe.style.position = ''; // iframe.style.position = '';
iframe.style.top = iframe.style.left = ''; // iframe.style.top = iframe.style.left = '';
iframe.style.zIndex = ''; // iframe.style.zIndex = '';
iframe.style.width = '100%'; // iframe.style.width = '100%';
iframe.style.height = ''; // iframe.style.height = '';
document.body.removeEventListener('keyup', escape, false); // document.body.removeEventListener('keyup', escape, false);
respond('exitFullScreen'); // respond('exitFullScreen');
}; // };
// Listen for messages from iframes // Listen for messages from iframes

View File

@ -357,7 +357,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body) {
// Create semi fullscreen. // Create semi fullscreen.
if (H5P.isFramed) { if (H5P.isFramed) {
return; // TODO: Ask parent for iframe return; // TODO: Should we support semi-fullscreen for IE9 & 10 ?
} }
before('h5p-semi-fullscreen'); before('h5p-semi-fullscreen');