The undoDraw attribute specifies conditions in which any drawing on a given trial should be erased.
<trial> <likert> <openended> <sliderTrial> <surveyPage>
Name | Type | Description |
---|---|---|
script | script |
This parameter contains script to be evaluated at the end of the trial. If the script returns true, any drawing on that trial will be removed from the screen. This attribute thus provides a mechanism for a give task to allow participants to undo drawing mistakes (e.g., tracing to the incorrect target in the Trail Making Test.
Requires an explicit 'return' statement.
The following trial erases a drawing if the participant clicks on an "undo" button placed on the screen. Note that 'this' represents 'trial.myTrial' in this context.
<trial myTrial>
/ stimulusTimes = [0=start, undo]
/ undoDraw = {
return this.response == "undo";
}
</trial>