API Docs for: 3.18.1

SliderValueRange Class

Module: slider-value-range
Parent Module: slider

One class of value algorithm that can be built onto SliderBase. By default, values range between 0 and 100, but you can configure these on the built Slider class by setting the min and max configurations. Set the initial value (will cause the thumb to move to the appropriate location on the rail) in configuration as well if appropriate.

Item Index

Methods

Properties

Methods

getValue

() Number

Returns the current value. Override this if you want to introduce output formatting. Otherwise equivalent to slider.get( "value" );

Returns:

setValue

(
  • val
)
Slider chainable

Updates the current value. Override this if you want to introduce input value parsing or preprocessing. Otherwise equivalent to slider.set( "value", v );

Parameters:

Returns:

Properties

Attributes

majorStep

Number

amount to increment/decrement the Slider value when the page up/down keys are pressed

Default: 10

Fires event majorStepChange

Fires when the value for the configuration attribute majorStep is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

max

Number

The value associated with the farthest bottom, right position of the rail. Can be less than the configured min if you want values to increase from right-to-left or bottom-to-top.

Default: 100

Fires event maxChange

Fires when the value for the configuration attribute max is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

min

Number

The value associated with the farthest top, left position of the rail. Can be greater than the configured max if you want values to increase from right-to-left or bottom-to-top.

Default: 0

Fires event minChange

Fires when the value for the configuration attribute min is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

minorStep

Number

amount to increment/decrement the Slider value when the arrow up/down/left/right keys are pressed

Default: 1

Fires event minorStepChange

Fires when the value for the configuration attribute minorStep is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

value

Number

The value associated with the thumb's current position on the rail. Defaults to the value inferred from the thumb's current position. Specifying value in the constructor will move the thumb to the position that corresponds to the supplied value.

Default: (inferred from current thumb position)

Fires event valueChange

Fires when the value for the configuration attribute value is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.