Whether there is a 'isPressedIn' function in psychojs?

I want to make a BERT with mouse and i found that there is no function called isPressedIn in psychojs,
although in mouse.isPressedIn() reneeb said that it exist.

图片

And i did not find the function in your github (https://github.com/psychopy/psychojs/tree/master/js/core), i want to know whether will you join this function into psychojs recently?

1 Like

Hi @pyl8128, the pressedIn function does not exist in PsychoJS. You instead use the following, where object is the thing you are clicking with the mouse:

if (object.contains(mouse) && mouse.getPressed()[0] === 1) {
   // Do this
}
1 Like