Skip to content

Fullscreen #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ body {
margin: 0;
padding: 0;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgb(63, 63, 63);
}

body {
background: rgb(63, 63, 63);
font-family: 'Roboto', sans-serif;
color: rgb(187, 187, 187);
-webkit-font-smoothing: subpixel-antialiased;
Expand Down
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ <h3>
</h3>
</button>
<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="wrapper">
<i class="fa fa-share" aria-hidden="true"></i> Share <input type="text" class="collapse" id="shared">
Expand Down
19 changes: 19 additions & 0 deletions js/dom/enable_fullscreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'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 () {
db [$func] ();
});
};
6 changes: 4 additions & 2 deletions js/dom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const showRequestedAlgorithm = require('./show_requested_algorithm');
const showWiki = require('./show_wiki');
const enableSearch = require('./enable_search');
const resizeWorkspace = require('./resize_workspace');
const enableFullScreen = require('./enable_fullscreen');

module.exports = {
showAlgorithm,
Expand All @@ -19,5 +20,6 @@ module.exports = {
showRequestedAlgorithm,
showWiki,
enableSearch,
resizeWorkspace
};
resizeWorkspace,
enableFullScreen
};
4 changes: 3 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ $(() => {

//enable search feature
DOM.enableSearch ();
//enable fullscreen feature
DOM.enableFullScreen ();

// determine if the app is loading a pre-existing scratch-pad
// or the home page
Expand Down Expand Up @@ -85,4 +87,4 @@ $(() => {
window.location.href = window.location.protocol + '//' + window.location.host + window.location.pathname + '#path=scratch/' + vLoadedScratch;
}

});
});
7 changes: 6 additions & 1 deletion public/algorithm_visualizer.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,15 @@ body {
margin: 0;
padding: 0;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgb(63, 63, 63);
}

body {
background: rgb(63, 63, 63);
font-family: 'Roboto', sans-serif;
color: rgb(187, 187, 187);
-webkit-font-smoothing: subpixel-antialiased;
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy