1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00
Commit Graph

36 Commits

Author SHA1 Message Date
Sijia Zhao
dd23484cf5 Remove need to unfocus/deselect input elements in DlgFromDict before being able to click the "Ok" button
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
2020-05-19 18:58:52 +01:00
Sijia Zhao
e907c0c897 Prevent special characters in DlgFromDict dictionary causing DOM element selection problems
Use
$.escapeSelector()

Requires jQuery 3.0+
2020-05-19 18:47:16 +01:00
Sijia Zhao
4b064bccc0 Fix DlgFromDict form labels not focussing/selecting corresponding input element
Use
htmlCode += '<label for="' + keyId + '">' + key + '</label>';
2020-05-19 18:42:59 +01:00
Sijia Zhao
d4b52796c9 Fix blurry Pixi canvas
Add
resolution: window.devicePixelRatio,
2020-05-19 18:40:56 +01:00
Alain Pitiot
092829f325 Merge branch 'master' of https://github.com/psychopy/psychojs 2020-05-12 18:34:05 +02:00
Alain Pitiot
1cf40c4d8a _ 2020-05-12 18:31:11 +02:00
tpronk
9a11171ba2 Update Util.js 2020-04-30 15:56:31 +02:00
tpronk
926ec69386 Update Util.js
Added Blink detection (from snippet at https://stackoverflow.com/a/9851769)
2020-04-30 15:51:31 +02:00
Alain Pitiot
4942e0156e 2020.1 branch 2020-02-14 08:18:25 +01:00
Alain Pitiot
66bcefe1f1 small edits to Sound and TonePlayer 2019-08-01 13:35:20 +02:00
Alain Pitiot
b461e224a6 TonePlayer: test for Tone.js (it does not load in IE11) and play sound indefinitely if duration_s == -1 2019-08-01 11:29:14 +02:00
Alain Pitiot
039a8671c7 fixed issues: fullscreen mode, size of triangular marker in sliders; new features: window waitblanking 2019-07-31 10:37:51 +02:00
Alain Pitiot
e9f249bcde adequately deal with mixed letter+number values in condition file 2019-07-08 10:02:51 +02:00
Alain Pitiot
d20a4cb0a5 version 3.1.4 2019-07-08 09:05:15 +02:00
Alain Pitiot
982033a1b9 Merge branch 'master' of github.com:psychopy/psychojs 2019-04-19 09:50:37 +02:00
Alain Pitiot
03f06ac64a version 3.0.8 2019-04-19 09:50:14 +02:00
Alain Pitiot
8cd8a75baa
Merge pull request #45 from peircej/master
Fix: setReadOnly(false) was having no effect
2019-04-15 17:01:26 +02:00
earcanal
f3813a322c
Update Scheduler.js
Typo.
2019-04-11 16:54:25 +01:00
David Bridges
fb8115c68e BF: Add setSize method to Rect
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.
2019-04-11 13:01:58 +01:00
Jon Peirce
9f0d4f75ce Fix: setReadOnly(false) was having no effect
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?
2019-04-10 17:36:21 +01:00
Alain Pitiot
becf79b5d6 version 3.0.6: various bug fixes and enhancements 2019-03-12 09:28:31 +01:00
Alain Pitiot
1512ecfdc9 various edits 2018-12-28 13:43:48 +01:00
Alain Pitiot
900f438516 version 3.0.0b13 2018-12-28 13:13:50 +01:00
Alain Pitiot
e09061f797 added MovieStim 2018-12-11 17:55:26 +01:00
Alain Pitiot
0f8e055542 _ 2018-12-10 07:56:29 +01:00
Alain Pitiot
10e2bc0650 added util module 2018-12-10 07:35:21 +01:00
Alain Pitiot
14390697f1 fully documented the visual module; various bug fixes 2018-10-24 15:05:28 +02:00
Alain Pitiot
cc9a4202e9 various cosmetic changes 2018-10-08 17:07:15 +02:00
Alain Pitiot
965814fa90 updated license notices and readme 2018-10-08 16:56:51 +02:00
Alain Pitiot
86488521d6 PsychoJs version 3.0.0b11 2018-10-08 16:44:23 +02:00
Jon Roberts
e0e4b8d86b add seeding capability to psychojs random loops
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.
2017-06-22 16:53:41 -06:00
Jon Roberts
9cec1551c3 nReps and sequential/random/fullRandom
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
2017-05-31 14:10:22 -06:00
Jon Roberts
9ed64dc0fa Modify getKeys to use most pyglet keynames
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.
2017-05-18 11:04:27 -06:00
Jon Roberts
db48318de8 Use non-deprecated KeyboardEvent attributes
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 " ".
2017-05-10 13:29:41 -06:00
Jon Peirce
14f363ac9a Missing ; at end of line while setting nRemaining
(also my editor squelches blank space and makes EOLs uniform)
2017-04-06 15:36:22 +01:00
Jon Peirce
0d3ae2bd94 First commit to the new repository
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
2017-04-05 10:56:12 +01:00