GlobalEventHandlers.onchange only fires when focus is lost. However .oninput fires whenever contents are modified. Original requires "double click" behaviour: first click to deselect the input element, second click to actually click the "Ok" button. Old code results in "Ok" buttons remaining visually disabled thus confusing users even when input elements have been completed
Related to https://github.com/psychopy/psychojs/issues/44 point 2. This
fix allows users to call setSize to change rect size, as with Python code.
To change rect size, the setSize method calls the setWidth and
setHeight methods of Rect stim.
As noted in this discourse post:
https://discourse.psychopy.org/t/slider-setreadonly-sets-contrast-incorrectly/7055
Also, I wonder if we should be changing contrast by halving the color
values (if they are signed color vals) rather than the transparency, in
keeping with the Python version. Transparency will be weird if the scale
is on a textured backgorund?
I've worked out a simple way to add the seeding capability for
generating repeatable sequences of trials. It uses seedrandom()
from https://github.com/davidbau/seedrandom. This would require
adding the seedrandom.min.js from that repository to the
psychojs/js/vendors/ folder in the psychojs.zip file
that is packaged with the psychopy standalone app.
I don't know how to do that
It also requires a change to the JS_htmlHeader.tmpl in
the psychopy repository. see pull request with same title.
add psychoJS support for nReps and
sequential/random/fullRandom trial sequences.
Add columns from conditions files to data output.
Make loops marked as “isTrials” cause a data line
to be written each iteration. Add an “eventName”
column to the data file to identify whether a data
line was caused by a keyboard event or a loop iteration.
write out experiment data when quitPsychoJS() is called.
This commit goes with the one with the same name in the
psychopy project
Make keyDownHandler and getKeys give preference to
the use of the W3C standard keyboardEvent.code for
identifying keys pressed. The deprecated .keycode
attribute is still honored to allow older browsers
that do not support the .code attribute.
the keyList argument to getKeys should consist
of pyglet key names, allowing scripts created
using the builder to work in web experiments.
The KeyboardEvent.keyIdentifier and .keyCode attributes
have been deprecated. the .keyIdentifier attribute has
been replaced by the .key attribute.
Change keyDownHandler to use non-deprecated attributes
KeyboardEvent.code and KeyboardEvent.key.
Change getKeys to use these attributes to identify
which key was pressed.
keyList argument passed to getKeys can contain both
key codes, e.g. "KeyM" and "Space" and key values,
e.g. "m" and " ".
Ilixa have developed this code as a part of the project psychopy/psychopy
but it is now being moved to its own space, with its own issues list and
a more permissive license