TK.DragCapture

new DragCapture(widget, optionsopt)

TK.DragCapture is a low-level class for tracking drag events on both, touch and mouse events. It can be used for implementing drag'n'drop functionality as well as dragging the value of e.g. TK.Fader or TK.Knob. TK.DragValue derives from TK.DragCapture.

Parameters:
Name Type Attributes Default Description
widget Object

The parent widget making use of DragValue.

options Object <optional>
{ }

An object containing initial options.

Properties:
Name Type Attributes Description
options.node HTMLElement <optional>

The DOM element receiving the drag events. If not set the widgets element is used.

Source:

Extends

  • TK.Module

Events

movecapture

A movement was captured.

Parameters:
Name Type Description
event DOMEvent

The event object of the current move event.

Source:

startcapture

Capturing started.

Parameters:
Name Type Description
state object

An internal state object.

start DOMEvent

The event object of the initial event.

Source:

stopcapture

Capturing stopped.

Parameters:
Name Type Description
state object

An internal state object.

event DOMEvent

The event object of the current event.

Source: