Scroll Bars with RDK #787
-
Hello everyone, I have a question regarding the RDK plugin. When I run the plugin and look at the resulting dot motion field, I always have vertical and horizontal scroll bars and can move the screen around a little using the arrow keys (as long as the arrow keys are not the specified keyboard response choices). In jspsych.css, I have overflow-y: auto as was recommended in another post, but the scrolling remains. Is there a way to remove scrolling on the RDK plugin, maybe by specifying the size of the display so there is no overflow? Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I'm not familiar with the plugin, but these edits seem to help diff --git a/plugins/jspsych-rdk.js b/plugins/jspsych-rdk.js
index 40febc5..5064ff8 100644
--- a/plugins/jspsych-rdk.js
+++ b/plugins/jspsych-rdk.js
@@ -372,6 +372,9 @@ jsPsych.plugins["rdk"] = (function() {
//Remove the margins and padding of the canvas
canvas.style.margin = 0;
canvas.style.padding = 0;
+ canvas.style.position = 'absolute';
+ canvas.style.top = 0
+ canvas.style.left = 0;
//Get the context of the canvas so that it can be painted on.
var ctx = canvas.getContext("2d");
|
Beta Was this translation helpful? Give feedback.
I'm not familiar with the plugin, but these edits seem to help