Skip to content

Commit

Permalink
add 'showCursor' parameter (default true) to exp-lookit-images-audio
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim Scott committed May 5, 2021
1 parent 0d4e089 commit 620002e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions app/components/exp-lookit-images-audio/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export default ExpFrameBaseComponent.extend(VideoRecord, PauseUnpause, ExpandAss
default: true,
description: 'Whether to show a replay button (used only if showing Next button)'
},
showCursor: {
type: 'boolean',
default: true,
description: 'Whether to show the mouse cursor'
},
maximizeDisplay: {
type: 'boolean',
default: false,
Expand Down
8 changes: 7 additions & 1 deletion app/components/exp-lookit-images-audio/doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ The examples below show a variety of usages.
"doRecording": true,
"durationSeconds": 8,
"maximizeDisplay": true,
"showCursor": false,
"pageColor": "black",
"backgroundColor": "black"
Expand Down Expand Up @@ -186,7 +187,8 @@ The examples below show a variety of usages.
"text": "Some explanatory text for parents",
"title": "For parents"
},
"showProgressBar": true
"showProgressBar": true,
"showCursor": false
}
4. Image plus audio, with 'next' button to move on
Expand Down Expand Up @@ -511,6 +513,10 @@ pageColor [String | ``'white'``]
for acceptable syntax: can use color names ('blue', 'red', 'green', etc.), or
rgb hex values (e.g. '#800080' - include the '#')

showCursor [Boolean | ``true``]
Whether to show the mouse cursor during this frame. By default it is shown to allow clicking on buttons or images,
but it can be hidden for looking studies where it might be a distraction.

choiceAllowed [Boolean | ``false``]
Whether the user may click on images to select them.

Expand Down
2 changes: 1 addition & 1 deletion app/components/exp-lookit-images-audio/template.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{! template-lint-disable no-invalid-interactive}}

<div class="exp-lookit-image-audio">
<div class="exp-lookit-image-audio {{if showCursor "cursor-display"}}">

<div class="row recorder-container video-recorder-hidden">
<div id="recorder" class="col-xs-12">
Expand Down
9 changes: 7 additions & 2 deletions app/styles/components/exp-lookit-image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ $exp-lookit-preferential-looking-AR: 2;
$exp-lookit-preferential-looking-picwidth: 30;
$exp-lookit-preferential-looking-picmargin: 2;

// Display cursor even though we're in FS mode, to allow clicking on buttons and images

.exp-lookit-image-audio, .exp-lookit-image-audio *
{
margin:0;
padding:0;
cursor: auto !important;
}

// Display cursor even though we're in FS mode, to allow clicking on buttons and images
.exp-lookit-image-audio.cursor-display, .exp-lookit-image-audio.cursor-display *
{
cursor: auto !important;
}

// Pieces not used yet, for the preferential looking sections
Expand Down

0 comments on commit 620002e

Please sign in to comment.