new Form(options)
Form stimulus.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Mixes In:
- Source:
Extends
Members
contains
Determine whether an object is inside the bounding box of the stimulus.
- Overrides:
- Source:
setOri
Setter for the orientation attribute.
- Inherited From:
- Source:
setPos
Setter for the position attribute.
- Inherited From:
- Source:
setSize
Setter for the size attribute.
- Inherited From:
- Source:
Methods
(protected) _estimateBoundingBox()
Estimate the bounding box.
- Overrides:
- Source:
(protected) _onChange(withPixiopt, withBoundingBoxopt) → {function}
Generate a callback that prepares updates to the stimulus.
This is typically called in the constructor of a stimulus, when attributes are added with _addAttribute.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
withPixi |
boolean |
<optional> |
false | whether or not the PIXI representation must also be updated |
withBoundingBox |
boolean |
<optional> |
false | whether or not to immediately estimate the bounding box |
- Inherited From:
- Source:
Returns:
- Type
- function
addDataToExp(experiment, formatopt)
Add the form data to the given experiment.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
experiment |
module:data.ExperimentHandler | the experiment into which to insert the form data | ||
format |
string |
<optional> |
'rows' | whether to insert the data as rows or as columns |
- Source:
draw()
Overridden draw that also calls the draw method of all form elements.
- Source:
formComplete() → {boolean}
Check if the form is complete.
- Source:
Returns:
- whether there are any remaining incomplete responses.
- Type
- boolean
getData() → {object}
Collate the questions and responses into a single dataset.
- Source:
Returns:
- the dataset with all questions and responses.
- Type
- object
hide()
Overridden hide that also calls the hide method of all form elements.
- Source:
refresh()
Force a refresh of the stimulus.
- Overrides:
- Source:
reset()
Reset the form.
- Source: