Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
Slider

Slider Class Reference

Constructors

Instance Methods

Constructors

new Slider(parameters)

Initializes an instance of Slider.

Instance Methods

slider.getCancelID() ⇒ Number

Get the CancelID

Kind: Instance method of Slider
Returns: Number - the KEY_CANCEL_ID value

slider.getNumTicks() ⇒ Number

Get the NumTicks

Kind: Instance method of Slider
Returns: Number - the KEY_NUM_TICKS value

slider.getPosition() ⇒ Number

Get the Position

Kind: Instance method of Slider
Returns: Number - the KEY_POSITION value

slider.getSliderFooter() ⇒ Array.<String>

Get the SliderFooter

Kind: Instance method of Slider
Returns: Array.<String> - the KEY_SLIDER_FOOTER value

slider.getSliderHeader() ⇒ String

Get the SliderHeader

Kind: Instance method of Slider
Returns: String - the KEY_SLIDER_HEADER value

slider.getTimeout() ⇒ Number

Get the Timeout

Kind: Instance method of Slider
Returns: Number - the KEY_TIMEOUT value

slider.setCancelID(id) ⇒ Slider

Set the CancelID

Kind: Instance method of Slider
Returns: Slider - The class instance for method chaining.

ParamTypeDescription
id Number An ID for this specific Slider to allow cancellation through the `CancelInteraction` RPC. - The desired CancelID.

slider.setNumTicks(ticks) ⇒ Slider

Set the NumTicks

Kind: Instance method of Slider
Returns: Slider - The class instance for method chaining.

ParamTypeDescription
ticks Number Number of selectable items on a horizontal axis - The desired NumTicks. {'num_min_value': 2, 'num_max_value': 26}

slider.setPosition(position) ⇒ Slider

Set the Position

Kind: Instance method of Slider
Returns: Slider - The class instance for method chaining.

ParamTypeDescription
position Number Initial position of slider control (cannot exceed numTicks) - The desired Position. {'num_min_value': 1, 'num_max_value': 26}

slider.setSliderFooter(footer) ⇒ Slider

Set the SliderFooter

Kind: Instance method of Slider
Returns: Slider - The class instance for method chaining.

ParamTypeDescription
footer Array.<String> Text footer to display (meant to display min/max threshold descriptors). For a static text footer, only one footer string shall be provided in the array. For a dynamic text footer, the number of footer text string in the array must match the numTicks value. For a dynamic text footer, text array string should correlate with potential slider position index. If omitted on supported displays, no footer text shall be displayed. - The desired SliderFooter. {'array_min_size': 1, 'array_max_size': 26, 'string_min_length': 1, 'string_max_length': 500}

slider.setSliderHeader(header) ⇒ Slider

Set the SliderHeader

Kind: Instance method of Slider
Returns: Slider - The class instance for method chaining.

ParamTypeDescription
header String Text header to display - The desired SliderHeader. {'string_min_length': 1, 'string_max_length': 500}

slider.setTimeout(timeout) ⇒ Slider

Set the Timeout

Kind: Instance method of Slider
Returns: Slider - The class instance for method chaining.

ParamTypeDescription
timeout Number App defined timeout. Indicates how long of a timeout from the last action (i.e. sliding control resets timeout). If omitted, the value is set to 10000. - The desired Timeout. {'default_value': 10000, 'num_min_value': 1000, 'num_max_value': 65535}
View on GitHub.com
Previous Section Next Section