ScrollValue

ScrollValue

new ScrollValue(optionsopt)

Source:
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 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.

options.focus HTMLElement | Boolean <optional>
false

Focus this element on scroll. Set to false if no focus should be set.

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

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

An object containing initial options.

Extends

  • Module

Events

scrollended

Source:

Is fired when scrolling ended.

scrolling

Source:

Is fired while scrolling happens.

Parameters:
Name Type Description
event DOMEvent

The native DOM event.

scrollstarted

Source:

Is fired when scrolling starts.

Parameters:
Name Type Description
event DOMEvent

The native DOM event.