Sort images in a 3x2 grid #1069
Replies: 6 comments 9 replies
-
Hi @n400peanuts! Have you seen the Drag and Drop API? I think this is what you'll want to use. You could build a new plugin with this API, based on the free-sort plugin. But note that the free-sort plugin uses the 'mousedown' events to track and record the X-Y position of each element, whereas you might be better off using the draggable element's 'ondrop' event to record each move. If you get anywhere with building this plugin, please feel free to share your code and ask specific questions. This might make a cool addition to the library! |
Beta Was this translation helpful? Give feedback.
-
Hi there! I am looking for pretty much the same functionality at the moment. Have you made any progress you'd be willing to share, @n400peanuts? @becky-gilbert, if you have any new info/tools/plugin to accomplish "dragging and dropping into a grid", that would be very much appreciated! I've started working from the free-sort and vsl-grid-scene plugins but haven't got too far yet. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi @Andre3582, I am looking for something similar. I am trying to help a friend build an experiment where different photos would be placed in a grid. thanks in advance, |
Beta Was this translation helpful? Give feedback.
-
Thank you Andre,
no problem at all! I understand completely!
I have made some progress, but it is useful to see what other people have done, might be that your solution is more elegant than mine 😉
Thanks a lot!
I'll report back as soon as I find the time to put my hands on it
…________________________________
From: Andre3582 ***@***.***>
Sent: Tuesday, April 20, 2021 5:24 PM
To: jspsych/jsPsych ***@***.***>
Cc: kernel52 ***@***.***>; Mention ***@***.***>
Subject: Re: [jspsych/jsPsych] Sort images in a 3x2 grid (#1069)
Hi!
Sorry I've kept you waiting for so long! I was caught up with other work. In case it still might be of some use here's the plugin I wrote for displaying and dragging/dropping images in a grid. https://github.com/Andre3582/Miscellaneous/blob/main/jspsych-copying-task-img.js<url>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1069 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABBBVIDYBJ35OEJEKX7XZLLTJWMDPANCNFSM4RWBYNUQ>.
|
Beta Was this translation helpful? Give feedback.
-
Sure thing! If you want to quickly see what the plugin can do (visually) here's a demo: https://b2tsnequr2.cognition.run/. (it's a copying task where drag and drop the items to the emtpy grid to recreate the grid on the left). One more thing I need to mention is that the plugin depends on the Fabric.js library. |
Beta Was this translation helpful? Give feedback.
-
Hi @Andre3582! I wonder if there is a command missing that calls fabric.js, I would appreciate your help in understanding what I am doing wrong, or if you could share an example of a working file. Thank you so much! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm trying to figure out how to make a task where participants have to drag and drop images in a 3x2 grid.
Have anyone done already something similar? someone that could share with me their code and wisdom to help me understand how to proceed?
I think that the jspsych-free-sort plugin might do the trick, but as it is it's too "free" :-)
I'm not sure how to modify it, can you please help me understand what should be modified in the plugin?
I would need to:
I have no idea where to start, so any input is really appreciated.
Eva
Beta Was this translation helpful? Give feedback.
All reactions