Overflow (scroll) bars for Canvas-keyboard-response when canvas size is set to full screen size #3056
-
Hi, I ran into an unexpected behavior of the canvas-keyboard-response plugin. I expected that one could specify canvas size as large as the screen size, but then you get these overflow bars and the canvas does not fit on the screen (see below):
If I decrease canvas size, it fits on the screen (see below).
The reason seems to be embedding of the canvas element into another divider. I can see the reason for that, but it is unhandy for the cases where you want know the screen and not canvas coordinates of the drawn stimuli. What would you recommend? Make a custom canvas plugin or modify this one? Have other people had the same issue? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @artembelopolsky, Can you try adding this CSS rule to your document, after the import of .jspsych-content { max-width: 100%; } |
Beta Was this translation helpful? Give feedback.
Hi @jodeleeuw,
Thanks for your quick reply. This helps to center the drawing, but it doesn't fix the overflow. I had to add this to the plugin code:
c.style.display = 'block';
This fixes the issue. I also saw this relevant thread here: #1536
I saw that you have already marked this for the next version. Should I just change this locally for the plugins I use?