You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered inconsistent/incorrect behavior with the _ratingToPos function in PsychoJS compared to PsychoPy.
Possible Bug
In PsychoJS, _ratingToPos only returns the correct x or y position, with the other coordinate always being 0. If the slider's position is offset from the center (not at [0,0]), the resulting position returned by _ratingToPos will be incorrect.
In PsychoPy, _ratingToPos accepts both single numeric values and array-like inputs for ratings. However, in PsychoJS, the function only accepts arrays. I'm not sure if it's intentional or some other reason.
I would be happy to submit a PR to fix the first issue if you're open to that. As for the second point, perhaps it could be discussed further to determine whether this difference in input handling should be resolved.
The text was updated successfully, but these errors were encountered:
I've encountered inconsistent/incorrect behavior with the
_ratingToPos
function in PsychoJS compared to PsychoPy.Possible Bug
In PsychoJS,
_ratingToPos
only returns the correct x or y position, with the other coordinate always being 0. If the slider's position is offset from the center (not at [0,0]), the resulting position returned by_ratingToPos
will be incorrect.psychojs/src/visual/Slider.js
Lines 1354 to 1403 in 9265fd8
This issue does not occur in PsychoPy, where both x and y coordinates are correctly computed based on the slider's position.
https://github.com/psychopy/psychopy/blob/fa753ec368764989a557e57660adb5c8486c49da/psychopy/visual/slider.py#L586-L610
Feature vs Bug
In PsychoPy,
_ratingToPos
accepts both single numeric values and array-like inputs for ratings. However, in PsychoJS, the function only accepts arrays. I'm not sure if it's intentional or some other reason.I would be happy to submit a PR to fix the first issue if you're open to that. As for the second point, perhaps it could be discussed further to determine whether this difference in input handling should be resolved.
The text was updated successfully, but these errors were encountered: