Commit 4d28daed authored by Curtis Adam's avatar Curtis Adam

Add the screenfull library to trigger the browser fullscreen

parent 9c7881f6
import {Session} from "meteor/session";
import {Route} from "./route";
import {CardType} from "./cardTypes";
import * as screenfull from 'screenfull';
let editorFullScreenActive = false;
export let CardVisuals = class CardVisuals {
......@@ -81,6 +81,7 @@ export let CardVisuals = class CardVisuals {
}
Session.set('dictionaryPreview', 0);
if ((Session.get('fullscreen') || forceOff) && (!Route.isPresentation())) {
screenfull.exit();
Session.set('fullscreen', false);
$("#theme-wrapper").css("margin-top", "70px");
$("#answerOptions").css("margin-top", "0");
......@@ -99,6 +100,7 @@ export let CardVisuals = class CardVisuals {
editorFullScreenActive = false;
} else {
Session.set('fullscreen', true);
screenfull.request();
$(".box").removeClass("disableCardTransition");
$("#theme-wrapper").css("margin-top", "20px");
$("#answerOptions").css("margin-top", "-50px");
......
......@@ -9340,6 +9340,11 @@
"https-proxy-agent": "1.0.0"
}
},
"screenfull": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/screenfull/-/screenfull-3.3.2.tgz",
"integrity": "sha512-zrnT8EidEWGFkmXEa1d/YUYNvvJaMX05g4O82K+Oiy9jR6Fh3ZTsovsccJOjRJyhS0KPV7AQpDFQRAYXBl9a5A=="
},
"selenium-standalone": {
"version": "6.12.0",
"resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-6.12.0.tgz",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment