Skip to content

Showing subject their sketchpad drawing after it's done #3083

Answered by sshelat
sshelat asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, I managed to figure it out. Code is below:

    var trial = {
      type: jsPsychSketchpad,
      prompt: '<p>Draw an image.</p>',
      prompt_location: 'abovecanvas',
      canvas_width: 300,
      canvas_height: 300,
      canvas_border_width: 2,
      save_strokes: false,
      stroke_color_palette: ['black', 'brown', 'grey', 'purple', 'blue', 'green', 'yellow', 'orange', 'red'],
      data: {
        drawing: "yes"
      }
    };


    timeline.push(trial, trial);


    var pngCells = [];

    var myfunc = function(data){
        var drawingRows = data.values();
        //console.log(drawingRows)
        //console.log(typeof drawingRows);
        for (var i = 0; i < drawingRows.l…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sshelat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant