Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

mouse release via javascript

Hi,

I know that the mouse release event isn't supported in osweb via the GUI builder. But is there a possibility to capture it via javascript?

My task is the following. I show a picture and the participants are supposed to indicate where in the picture they see the object. The best way to do this would be by having something like a lasso feature, to free-handedly draw a shape around the object while keeping the mouse button pressed. Alternatives are to draw the shape by clicking several times in a row and connecting the dots by straight lines. Or, which im trying to implement at the moment, to just draw an ellipse with the mouse button pressed.

So far, I'm managing to have the participant draw the ellipse by making two clicks, capturing the click positions and altering the position variables of the ellipse accordingly.

Having it work with with an ellipse, mouse down to start, then drag the ellipse with a 'preview' of its shape and then mouse release would already be great. The rest is bonus. The current version with two clicks and no 'preview' of the shape in between is just very unintuitive.

I would be very happy for any kind of help or suggestions.

Thanks a lot!

Cheers, Lars

Comments

  • Hi Lars,

    I can't help you beyond confirming that it is currently not possible to do this within the scope of Opensesame. However, there is a fair chance you could make it work with the help of Google and regular(ish) javascript. Mouse release events are certainly supported in browsers, the tricky thing is to integrate it with Opensesame. How this is done, I have no idea. Sorry!

    Good luck,

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.