Issue converting an object to numerical form in drag and drop

URL of experiment: Pavlovia

Description of the problem:

I am working to get a drag and drop experiment working online (whereby a rectangle is dragged horizontally to a particular target position)

I think there is something wrong with how my code component for the net is set up (see screen shot python and JS code).

The code aims to:

Begin routine:
Create a list called nets (composed of the rectangle polygons that will be presented on each trial- one per trial).

Each frame:
For net in nets
A loop is created to loop through a drag and drop process that allows the rectangular net to move each frame

The error seems to be coming from this particular code component (as indicated by the messages in the developer tools) however I can’t tell whether it is a small syntax error or something deeper in terms of how the loops are set up.

Any advice on the JS code would be much appreciated.

Hi Lucy,

Maybe your browser developer tools can give a useful pointer as to where the error is? Have a look in the crib sheet to find out how.

Best, Thomas

Thank you Thomas. I’m on my way to figuring out what the issue is using the developer tools :slight_smile:

1 Like