Commit 54adef15 authored by Andrew Rozsa's avatar Andrew Rozsa

Changed opacity

parent 434c603a
......@@ -987,7 +987,7 @@ function Video_trialRoutineBegin(snapshot) {
window.webgazer.removeMouseEventListeners();
//Opacity of tracking square for comparing on-task versus off-task
window.CurrOpac = 1;
window.CurrOpac = 1; //set to 0 to turn off tracking square
document.getElementById('webgazerFaceFeedbackBox').style.opacity = '0'; //set to 0 after demo
/* Uncomment to have video present
......
......@@ -992,7 +992,7 @@ function Video_trialRoutineBegin(snapshot) {
window.webgazer.removeMouseEventListeners();
//Opacity of tracking square for comparing on-task versus off-task
window.CurrOpac = 1;
window.CurrOpac = 1; //set to 0 to turn off tracking square
document.getElementById('webgazerFaceFeedbackBox').style.opacity = '0'; //set to 0 after demo
/* Uncomment to have video present
......
......@@ -280,7 +280,7 @@
<Param name="Before JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="&amp;#10;offtask = 0;&amp;#10;ontask = 0;&amp;#10;// Remove the click tracker used for calibration&amp;#10;window.webgazer.removeMouseEventListeners();&amp;#10;&amp;#10;//Opacity of tracking square for comparing on-task versus off-task&amp;#10;window.CurrOpac = 1;&amp;#10;&amp;#10;document.getElementById('webgazerFaceFeedbackBox').style.opacity = '0'; //set to 0 after demo&amp;#10;/* Uncomment to have video present &amp;#10;document.getElementById('webgazerVideoFeed').style.display = &quot;block&quot;; &amp;#10;*/&amp;#10;document.getElementById('webgazerVideoFeed').style.opacity = '0'; //set to 1 if want present demo&amp;#10; &amp;#10;/* use this to determine which video to play based on session*/&amp;#10;let src = ('youtube'+expInfo['session']+'.html?participant='+expInfo['participant']); &amp;#10;timer = new util.MonotonicClock();&amp;#10;&amp;#10;/*Code based on Arnon Weinberg's Custom Web Component study https://gitlab.pavlovia.org/arnon_weinberg/custom-web-component*/ &amp;#10;&amp;#10;params = new Map; // Results added here after form is submitted&amp;#10; $(window).data('continueRoutine', true); // Routines can't be ended from outside Each Frame&amp;#10; $(document).ready(function() {&amp;#10; // Add custom contents from html file using an iframe:&amp;#10; $('body').append('&lt;div id=&quot;iframe-o&quot; style=&quot;visibility: hidden; position: relative; display: table; margin: auto;&quot;&gt;&lt;div id=&quot;iframe-m&quot; style=&quot;display: table-cell; vertical-align: middle;&quot;&gt;&lt;div id=&quot;iframe-i&quot; style=&quot;display: inline-block; width:100%; overflow-y: auto; overflow-x: hidden;&quot;&gt;&lt;iframe id=&quot;iframe&quot; src=&quot;'+src+'&quot; style=&quot;width: 100%; height: 100%;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;');&amp;#10; &amp;#10; $('#iframe').on('load',function(iframe){&amp;#10; let contents = $(this).contents().find('html');&amp;#10; contents.css({ 'display': 'table', 'overflow-x': 'hidden', 'margin': 'none'});&amp;#10; &amp;#10; // Detect absolute vs relative dimensions: This hack exposes the raw sizes...&amp;#10; $('#iframe').hide();&amp;#10; contents.data('width', ! /%$/.test(contents.css('width')));&amp;#10; contents.data('height', ! /%$/.test(contents.css('height')));&amp;#10; $('#iframe').show();&amp;#10; &amp;#10; // Auto-adjust iframe size:&amp;#10; if ( contents.data('width') ) { // absolute width&amp;#10; // $('#iframe-m').width(contents.width()+20);&amp;#10; $('#iframe-m').width(contents.width());&amp;#10; contents.css({ 'width': '100%' });&amp;#10; }&amp;#10; else { // responsive width&amp;#10; // $('#iframe-i').width ( $(window).width()-20, true );&amp;#10; $('#iframe-i').width ( $(window).width(), true );&amp;#10; }&amp;#10; if ( contents.data('height') ) { // absolute height&amp;#10; //$('#iframe-o').height($(window).height()-20, true);&amp;#10; $('#iframe-o').height($(window).height(), true);&amp;#10; $('#iframe-i').height ( Math.min ( contents.height()+20, $(window).height()-20 ), true );&amp;#10; }&amp;#10; else { // responsive height&amp;#10; $('#iframe-i').height ( $(window).height(), true );&amp;#10; // $('#iframe-i').height ( $(window).height()-20, true );&amp;#10; }&amp;#10; $('#iframe-o').css('visibility','visible');&amp;#10; &amp;#10; });&amp;#10; });&amp;#10; &amp;#10; window.intervalTimer = new util.Clock(); &amp;#10; window.flipTime = 0; &amp;#10;&amp;#10;//To identify how long to run video before going to survey, &amp;#10;P1S1 = false;&amp;#10;P1S2 = false;&amp;#10;&amp;#10;if (expInfo['participant'] == '1' &amp;&amp; expInfo['session'] == '1')&amp;#10; { &amp;#10; P1S1 = true;&amp;#10; vidDur = 690; &amp;#10; }&amp;#10; else &amp;#10; {&amp;#10; {&amp;#10; P1S2 = true;&amp;#10; vidDur = 612;&amp;#10; }&amp;#10; } //2&amp;#10; &amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="&amp;#10;offtask = 0;&amp;#10;ontask = 0;&amp;#10;// Remove the click tracker used for calibration&amp;#10;window.webgazer.removeMouseEventListeners();&amp;#10;&amp;#10;//Opacity of tracking square for comparing on-task versus off-task&amp;#10;window.CurrOpac = 1; //set to 0 to turn off tracking square&amp;#10;&amp;#10;document.getElementById('webgazerFaceFeedbackBox').style.opacity = '0'; //set to 0 after demo&amp;#10;/* Uncomment to have video present &amp;#10;document.getElementById('webgazerVideoFeed').style.display = &quot;block&quot;; &amp;#10;*/&amp;#10;document.getElementById('webgazerVideoFeed').style.opacity = '0'; //set to 1 if want present demo&amp;#10; &amp;#10;/* use this to determine which video to play based on session*/&amp;#10;let src = ('youtube'+expInfo['session']+'.html?participant='+expInfo['participant']); &amp;#10;timer = new util.MonotonicClock();&amp;#10;&amp;#10;/*Code based on Arnon Weinberg's Custom Web Component study https://gitlab.pavlovia.org/arnon_weinberg/custom-web-component*/ &amp;#10;&amp;#10;params = new Map; // Results added here after form is submitted&amp;#10; $(window).data('continueRoutine', true); // Routines can't be ended from outside Each Frame&amp;#10; $(document).ready(function() {&amp;#10; // Add custom contents from html file using an iframe:&amp;#10; $('body').append('&lt;div id=&quot;iframe-o&quot; style=&quot;visibility: hidden; position: relative; display: table; margin: auto;&quot;&gt;&lt;div id=&quot;iframe-m&quot; style=&quot;display: table-cell; vertical-align: middle;&quot;&gt;&lt;div id=&quot;iframe-i&quot; style=&quot;display: inline-block; width:100%; overflow-y: auto; overflow-x: hidden;&quot;&gt;&lt;iframe id=&quot;iframe&quot; src=&quot;'+src+'&quot; style=&quot;width: 100%; height: 100%;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;');&amp;#10; &amp;#10; $('#iframe').on('load',function(iframe){&amp;#10; let contents = $(this).contents().find('html');&amp;#10; contents.css({ 'display': 'table', 'overflow-x': 'hidden', 'margin': 'none'});&amp;#10; &amp;#10; // Detect absolute vs relative dimensions: This hack exposes the raw sizes...&amp;#10; $('#iframe').hide();&amp;#10; contents.data('width', ! /%$/.test(contents.css('width')));&amp;#10; contents.data('height', ! /%$/.test(contents.css('height')));&amp;#10; $('#iframe').show();&amp;#10; &amp;#10; // Auto-adjust iframe size:&amp;#10; if ( contents.data('width') ) { // absolute width&amp;#10; // $('#iframe-m').width(contents.width()+20);&amp;#10; $('#iframe-m').width(contents.width());&amp;#10; contents.css({ 'width': '100%' });&amp;#10; }&amp;#10; else { // responsive width&amp;#10; // $('#iframe-i').width ( $(window).width()-20, true );&amp;#10; $('#iframe-i').width ( $(window).width(), true );&amp;#10; }&amp;#10; if ( contents.data('height') ) { // absolute height&amp;#10; //$('#iframe-o').height($(window).height()-20, true);&amp;#10; $('#iframe-o').height($(window).height(), true);&amp;#10; $('#iframe-i').height ( Math.min ( contents.height()+20, $(window).height()-20 ), true );&amp;#10; }&amp;#10; else { // responsive height&amp;#10; $('#iframe-i').height ( $(window).height(), true );&amp;#10; // $('#iframe-i').height ( $(window).height()-20, true );&amp;#10; }&amp;#10; $('#iframe-o').css('visibility','visible');&amp;#10; &amp;#10; });&amp;#10; });&amp;#10; &amp;#10; window.intervalTimer = new util.Clock(); &amp;#10; window.flipTime = 0; &amp;#10;&amp;#10;//To identify how long to run video before going to survey, &amp;#10;P1S1 = false;&amp;#10;P1S2 = false;&amp;#10;&amp;#10;if (expInfo['participant'] == '1' &amp;&amp; expInfo['session'] == '1')&amp;#10; { &amp;#10; P1S1 = true;&amp;#10; vidDur = 690; &amp;#10; }&amp;#10; else &amp;#10; {&amp;#10; {&amp;#10; P1S2 = true;&amp;#10; vidDur = 612;&amp;#10; }&amp;#10; } //2&amp;#10; &amp;#10;" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="JS" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
......
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