提交 1639ea03 编写于 作者: E EC2 Default User

Fullscreen Mode

上级 7384a628
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
</h3> </h3>
</button> </button>
<div class="top-menu-buttons"> <div class="top-menu-buttons">
<div class="btn" id="btn_fullscreen">
<div class="wrapper">
<i class="fa fa-arrows-alt"></i> Fullscreen
</div>
</div>
<div class="btn" id="btn_share"> <div class="btn" id="btn_share">
<div class="wrapper"> <div class="wrapper">
<i class="fa fa-share" aria-hidden="true"></i> Share <input type="text" class="collapse" id="shared"> <i class="fa fa-share" aria-hidden="true"></i> Share <input type="text" class="collapse" id="shared">
......
'use strict';
module.exports = () => {
let $func = 'requestFullScreen',
vendorPrefixes = ['webkit', 'moz', 'ms', 'o'],
db = document.body;
for (let p of vendorPrefixes) {
let fName = p + $func [0].toUpperCase () + $func.slice (1);
if (db [fName]) {
$func = fName;
break;
}
}
$('#btn_fullscreen').click (function () {
console.log ('callinggggg', $func);
db [$func] ();
});
};
...@@ -9,6 +9,7 @@ const showRequestedAlgorithm = require('./show_requested_algorithm'); ...@@ -9,6 +9,7 @@ const showRequestedAlgorithm = require('./show_requested_algorithm');
const showWiki = require('./show_wiki'); const showWiki = require('./show_wiki');
const enableSearch = require('./enable_search'); const enableSearch = require('./enable_search');
const resizeWorkspace = require('./resize_workspace'); const resizeWorkspace = require('./resize_workspace');
const enableFullScreen = require('./enable_fullscreen');
module.exports = { module.exports = {
showAlgorithm, showAlgorithm,
...@@ -19,5 +20,6 @@ module.exports = { ...@@ -19,5 +20,6 @@ module.exports = {
showRequestedAlgorithm, showRequestedAlgorithm,
showWiki, showWiki,
enableSearch, enableSearch,
resizeWorkspace resizeWorkspace,
}; enableFullScreen
\ No newline at end of file };
...@@ -47,6 +47,8 @@ $(() => { ...@@ -47,6 +47,8 @@ $(() => {
//enable search feature //enable search feature
DOM.enableSearch (); DOM.enableSearch ();
//enable fullscreen feature
DOM.enableFullScreen ();
// determine if the app is loading a pre-existing scratch-pad // determine if the app is loading a pre-existing scratch-pad
// or the home page // or the home page
...@@ -85,4 +87,4 @@ $(() => { ...@@ -85,4 +87,4 @@ $(() => {
window.location.href = window.location.protocol + '//' + window.location.host + window.location.pathname + '#path=scratch/' + vLoadedScratch; window.location.href = window.location.protocol + '//' + window.location.host + window.location.pathname + '#path=scratch/' + vLoadedScratch;
} }
}); });
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册