Class: SliderComponent

SliderComponent(dataObjectopt, optionsopt)

SliderComponent gives the user the ability to choose from a range of values by dragging a handle from side to side of a bar.

Constructor

new SliderComponent(dataObjectopt, optionsopt)

Parameters:
Name Type Attributes Default Description
dataObject DataObject <optional>
null
options Object <optional>
null
Source:
To Do:
  • Allow min and max values other than 0 and 1
  • Add granularity or "snapping" for example only allowing tenths.
Example
const sliderComponent = new SliderComponent()
sliderComponent.addListener(SliderComponent.ValueChangeViaInputEvent, (eventName, valueFraction) => {
	console.log('New slider fraction (from 0 to 1)', valueFraction)
})

Members

userIsChanging :boolean

true if the user is moving the handle
Type:
  • boolean
Source:

value :number

the current value
Type:
  • number
Source:

value

Source:

valueFraction

Source:

valueFraction

Source: