Slider

@native @JSType trait Slider extends Component
trait Component
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Abstract methods

def calculateDistance(event: Event): Double

Calculate distance for slider

Calculate distance for slider

Value Params
event

The event that caused this function to run.

Returns

The current position of the Slider. - position.x for vertical Sliders - position.y for horizontal Sliders

def createEl(`type`: String, props: Any, attributes: Any): Element

Create the Sliders DOM element.

Create the Sliders DOM element.

Value Params
[attributes={}]

list of attributes in Object form.

[props={}]

List of properties in Object form.

type

Type of element to create.

Returns

The element that gets created.

def disable(): Unit

Disable controls for this slider if they are enabled

Disable controls for this slider if they are enabled

def enable(): Unit

Enable controls for this slider if they are disabled

Enable controls for this slider if they are disabled

def enabled(): Boolean

Are controls are currently enabled for this slider or not.

Are controls are currently enabled for this slider or not.

Returns

true if controls are enabled, false otherwise

def handleBlur(): Unit

Handle a blur event on this Slider.

Handle a blur event on this Slider.

listens blur

def handleClick(event: Event): Unit

Listener for click events on slider, used to prevent clicks from bubbling up to parent elements like button menus.

Listener for click events on slider, used to prevent clicks from bubbling up to parent elements like button menus.

Value Params
event

Event that caused this object to run

def handleFocus(): Unit

Handle a focus event on this Slider.

Handle a focus event on this Slider.

listens focus

def handleMouseDown(event: Event): Unit

Handle mousedown or touchstart events on the Slider.

Handle mousedown or touchstart events on the Slider.

Value Params
event

mousedown or touchstart event that triggered this function listens mousedown listens touchstart fires Slider#slideractive

def handleMouseMove(event: Event): Unit

Handle the mousemove, touchmove, and mousedown events on this Slider. The mousemove and touchmove events will only only trigger this function during mousedown and touchstart. This is due to [[Slider#handleMouseDown]] and [[Slider#handleMouseUp]].

Handle the mousemove, touchmove, and mousedown events on this Slider. The mousemove and touchmove events will only only trigger this function during mousedown and touchstart. This is due to [[Slider#handleMouseDown]] and [[Slider#handleMouseUp]].

Value Params
event

mousedown, mousemove, touchstart, or touchmove event that triggered this function listens mousemove listens touchmove

def handleMouseUp(event: Event): Unit

Handle mouseup or touchend events on the Slider.

Handle mouseup or touchend events on the Slider.

Value Params
event

The mouseup event that caused this to run. listens touchend listens mouseup fires Slider#sliderinactive

def update(): Double

Update the progress bar of the Slider.

Update the progress bar of the Slider.

Returns

The percentage of progress the progress bar represents as a number from 0 to 1.

def vertical(bool: Boolean): Unit

Get/set if slider is horizontal for vertical

Get/set if slider is horizontal for vertical

Value Params
[bool]
  • true if slider is vertical, - false is horizontal
Returns
  • true if slider is vertical, and getting - false if the slider is horizontal, and getting
def vertical(): Boolean

Inherited methods

def $(selector: String, context: Element | String): Element
Inherited from
Component
def $$(selector: String, context: Element | String): NodeList
Inherited from
Component
def addChild(child: String | Component, options: Object): Unit
Inherited from
Component
def addClass(classToAdd: String): Unit
Inherited from
Component
def buildCSSClass(): String
Inherited from
Component
def children(): Array[Component]
Inherited from
Component
def clearInterval(intervalId: Int): Unit
Inherited from
Component
def clearTimeout(timeoutId: Int): Unit
Inherited from
Component
def contentEl(): Element
Inherited from
Component
def controlText(el: Element): Element
Inherited from
Component
def createEl(tagName: String, properties: Object, attributes: Object): Element
Inherited from
Component
def dimensions(width: Int | String, height: Int | String): Unit
Inherited from
Component
def dispose(): Unit
Inherited from
Component
def el(): Element
Inherited from
Component
def enableTouchActivity(): Unit
Inherited from
Component
def getChild(name: String): Component
Inherited from
Component
def getChildById(id: String): Component
Inherited from
Component
def handleClick(): Unit
Inherited from
Component
def handleKeyPress(): Unit
Inherited from
Component
def hasClass(classToCheck: String): Boolean
Inherited from
Component
def hasOwnProperty(v: String): Boolean
Inherited from
Object
def height(num: Int | String, skipListeners: Boolean): Int
Inherited from
Component
def hide(): Unit
Inherited from
Component
def id(): String
Inherited from
Component
def initChildren(): Unit
Inherited from
Component
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def name(): String
Inherited from
Component
def off(event: String, handler: Function): Unit
Inherited from
Component
def off(component: Component, event: String, handler: Function): Unit
Inherited from
Component
def on(event: String, handler: Function): Unit
Inherited from
Component
def on(component: Component, event: String, handler: Function): Unit
Inherited from
Component
def one(event: String, handler: Function): Unit
Inherited from
Component
def one(component: Component, event: String, handler: Function): Unit
Inherited from
Component
def options(obj: Object): Object
Inherited from
Component
def player(): Player
Inherited from
Component
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def ready(fn: Function, sync: Boolean): Slider
Inherited from
Component
def removeChild(component: Component): Unit
Inherited from
Component
def removeClass(classToRemove: String): Unit
Inherited from
Component
def setInterval(fn: Function, interval: Int): Unit
Inherited from
Component
def setTimeout(fn: Function, timeout: Int): Unit
Inherited from
Component
def show(): Unit
Inherited from
Component
def toLocaleString(): String
Inherited from
Object
def toggleClass(classToToggle: String, predicate: Function | Boolean): Unit
Inherited from
Component
def trigger(event: Object | String, hash: Object): Unit
Inherited from
Component
def triggerReady(): Unit
Inherited from
Component
def valueOf(): Any
Inherited from
Object
def width(num: Int | String, skipListeners: Boolean): Int
Inherited from
Component

Abstract fields