new Scroller()
Main Scroller class constructor
Methods
(private, static) _animateScrollH(direction, forceEnd)
Handle the animation for horizontal scrolling
Parameters:
Name | Type | Description |
---|---|---|
direction |
String | The direction animate in either up or down |
forceEnd |
Boolean | Determines whether the windowUp event should be automatically fired when the end has been reached, used by the touch swipe |
(private, static) _animateScrollV(direction, forceEnd)
Handle the animation for vertical scrolling
Parameters:
Name | Type | Description |
---|---|---|
direction |
String | The direction animate in either up or down |
forceEnd |
Boolean | Determines whether the windowUp event should be automatically fired when the end has been reached, used by the touch swipe |
(private, static) _initialize(options)
Initialize the component
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | These are the options passed to the scroller, if an option is ommitted then the default value will be used. |
(private, static) _onArrow()
Handle the arrow button press for both horizontal and vertical arrows
(private, static) _onBarDown()
Handle the bar down for the respective scroller
(private, static) _onTrack()
Handle the track click by the user
(private, static) _render()
Render the component element, this method can be called any number of times if the data for the component is added again
(private, static) _setBarSize()
Set the respective scrollbar size based on the content size ratio to display area
(private, static) _setElements()
Returns an object with the default html elements added
(private, static) _setEvents()
Set the events for the select menu
(static) destroy()
Destroy the component and remove all elements from the dom and clear all events added, returns a null value in the event the object was stored in a reference to nullify the reference
(static) getContentNode()
Get the content node from within the scroller object
(static) getDims()
Get the dimensions of the desired scrollbar which includes the width and height of the component