mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 18:50:54 +00:00
Merge cc01fe3c39
into 702cbc57b0
This commit is contained in:
commit
130aaccb1a
@ -143,4 +143,18 @@ export class ButtonStim extends TextBox
|
|||||||
{
|
{
|
||||||
return this.listener.isPressedIn(this, [1, 0, 0]);
|
return this.listener.isPressedIn(this, [1, 0, 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear previously stored times on / off and check current click state.
|
||||||
|
*
|
||||||
|
* In Builder, this is called at the start of each routine.
|
||||||
|
*/
|
||||||
|
reset() {
|
||||||
|
|
||||||
|
// Update wasClicked (so continued clicks at routine start are considered)
|
||||||
|
this.wasClicked = this.isClicked
|
||||||
|
// Clear on/off times
|
||||||
|
this.timesOn = []
|
||||||
|
this.timesOff = []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user