Skip to content
Discussion options

You must be logged in to vote

Hi @DanielBruijn, if you open the browser's developer tools and find the Elements tab, you'll see that the canvas element is actually nested under a few different things: body -> jspsych-content-wrapper-div -> jspsych-content div -> jspsych-canvas-keyboard-response-stimulus div -> canvas element. Most of these things have a height and width of 100%, except for the jspsych-content div, which has a max-width of 95%. This means that, by default, all of the jsPsych content will be slightly more narrow than the page width. You can change that like this:

<style>#jspsych-content {max-width:100%;}</style>

Then, to get the size of the browser page to use for the canvas height and width, you can us…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@DanielBruijn
Comment options

@becky-gilbert
Comment options

@DanielBruijn
Comment options

@DanielBruijn
Comment options

@becky-gilbert
Comment options

Answer selected by DanielBruijn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants