new Slider(options)
Slider stimulus.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Mixes In:
- Source:
- To Do:
-
- check that parameters are valid, e.g. ticks are an array of numbers, etc.
- readOnly
- complete setters, for instance setTicks should change this._isCategorical
- flesh out the skin approach
Extends
Members
contains
Determine whether an object is inside the bounding box of the stimulus.
- Overrides:
- Source:
getRating
Get the current value of the rating.
- Source:
getRT
Get the response time of the most recent change to the rating.
- Source:
refresh
Force a refresh of the stimulus.
- Overrides:
- Source:
reset
Reset the slider.
- Source:
setMarkerPos
Setter for the markerPos attribute.
Setting markerPos changes the visible position of the marker to the specified rating but does not change the actual rating returned by the slider.
- Source:
setOri
Setter for the orientation attribute.
- Inherited From:
- Source:
setPos
Setter for the position attribute.
- Inherited From:
- Source:
setRating
Setter for the rating attribute.
Setting the rating does not change the visible position of the marker.
- Source:
setReadOnly
Setter for the readOnly attribute.
Read-only sliders are half-opaque and do not provide responses.
- Source:
setSize
Setter for the size attribute.
- Inherited From:
- Source:
(readonly) Shape :Symbol
Shape of the marker and of the ticks.
Type:
- Symbol
- Source:
(readonly) Skin :any
Skin.
Type:
- any
- Source:
(readonly) Style :Symbol
Styles.
Type:
- Symbol
- 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
(protected) _sanitizeAttributes()
Sanitize the slider attributes: check for attribute conflicts, missing values, etc.
- Source:
recordRating(rating, responseTimeopt, logopt)
Set the current rating.
Setting the rating does also change the visible position of the marker.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
rating |
number | the rating | ||
responseTime |
number |
<optional> |
the reaction time | |
log |
boolean |
<optional> |
false | whether of not to log |
- Source: