TK.ScrollValue

new ScrollValue(optionsopt)

TK.ScrollValue enables the scroll wheel for setting a value of an object. For instance, it is used by TK.Knob to allow turning the knob using the scroll wheel.

Parameters:
Name Type Attributes Default Description
options Object <optional>
{ }

An object containing initial options.

Properties:
Name Type Attributes Default Description
options.node HTMLElement

The element receiving the scroll event.

options.get function <optional>
function () { return this.parent.options.value; }

Callback returning the value.

options.set function <optional>
function (v) { return this.parent.userset("value", v); }

Callback setting the value.

options.range function <optional>
function () { return this.parent; }

A function returning a TK.Range instance or options for a new one.

options.events function | Boolean <optional>
false

A function returning an element receiving events or false to fire events on the main element.

options.classes HTMLElement | Boolean <optional>
false

Element receiving classes or false to set classes on the main element.

options.active Boolean <optional>
true

Disable the scroll event.

options.scroll_direction Array.<Number> <optional>
[0, -1, 0]

An array containing values for x, y and z defining the direction of scrolling.

options.limit Boolean <optional>
false

Limit the returned value to min and max of the range.

Source:

Extends

  • TK.Module

Events

scrollended

Is fired when scrolling ended.

Source:

scrolling

Is fired while scrolling happens.

Parameters:
Name Type Description
event DOMEvent

The native DOM event.

Source:

scrollstarted

Is fired when scrolling starts.

Parameters:
Name Type Description
event DOMEvent

The native DOM event.

Source: