This commit is contained in:
Josh de Leeuw 2016-06-30 12:43:15 -04:00
parent 1455c86304
commit 6d8b877987
2 changed files with 19 additions and 1 deletions

View File

@ -89,6 +89,7 @@ input[type="text"] {
.jspsych-display-element { .jspsych-display-element {
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
@ -106,6 +107,13 @@ input[type="text"] {
margin: 50px; margin: 50px;
} }
.jspsych-content-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
}
/* jsPsych progress bar */ /* jsPsych progress bar */
#jspsych-progressbar-container { #jspsych-progressbar-container {
@ -115,6 +123,7 @@ input[type="text"] {
margin-bottom: 1em; margin-bottom: 1em;
text-align: center; text-align: center;
padding: 10px 0px; padding: 10px 0px;
width:100%;
} }
#jspsych-progressbar-container s {} #jspsych-progressbar-container s {}
#jspsych-progressbar-outer { #jspsych-progressbar-outer {

View File

@ -721,7 +721,16 @@ var jsPsych = (function() {
} }
function drawProgressBar() { function drawProgressBar() {
$('body').prepend($('<div id="jspsych-progressbar-container"><span>Completion Progress</span><div id="jspsych-progressbar-outer"><div id="jspsych-progressbar-inner"></div></div></div>')); $('.jspsych-display-element').prepend(
'<div id="jspsych-progressbar-container">'+
'<span>Completion Progress</span>'+
'<div id="jspsych-progressbar-outer">'+
'<div id="jspsych-progressbar-inner"></div>'+
'</div></div>'
);
$('.jspsych-content').wrap(
'<div class="jspsych-content-wrapper"></div>'
);
} }
function updateProgressBar() { function updateProgressBar() {