new DragValue(optionsopt)
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options.node |
Element | The DOM node used for dragging. All DOM events are registered with this Element. |
||
options.range |
function |
<optional> |
A function returning a Ranged object for calculating the value. Returns its parent (usually having Ranged-features) by default. |
|
options.events |
function |
<optional> |
Returns an element firing the
events |
|
options.classes |
Element | boolean |
<optional> |
false
|
While dragging, the class
|
options.get |
function |
<optional> |
Callback function returning the value to drag.
By default it returns |
|
options.set |
function |
<optional> |
Callback function for setting the value.
By default it calls |
|
options.direction |
String |
<optional> |
"polar"
|
Direction for changing the value.
Can be |
options.active |
Boolean |
<optional> |
true
|
If false, dragging is deactivated. |
options.cursor |
Boolean |
<optional> |
false
|
If true, a global cursor is set while dragging. |
options.blind_angle |
Number |
<optional> |
20
|
If options.direction is |
options.rotation |
Number |
<optional> |
45
|
Defines the angle of the center of the positive value changes. 0 means straight upward. For instance, a value of 45 leads to increasing value when moving towards top and right. |
options.reverse |
Boolean |
<optional> |
false
|
If true, the difference of pointer travel is inverted. |
options.limit |
Boolean |
<optional> |
false
|
Limit the returned value to min and max of the range. |
DragValue enables dragging an element and setting a value according to the dragged distance. DragValue is for example used in Knob and ValueButton.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
Object |
<optional> |
{ }
|
An object containing initial options. |
Extends
Events
dragging
- Source:
Is fired while a user is dragging.
Parameters:
Name | Type | Description |
---|---|---|
event |
DOMEvent | The native DOM event. |
movecapture
- Source:
- Inherited From:
A movement was captured.
Parameters:
Name | Type | Description |
---|---|---|
event |
DOMEvent | The event object of the current move event. |
startcapture
- Source:
- Inherited From:
Capturing started.
Parameters:
Name | Type | Description |
---|---|---|
state |
object | An internal state object. |
start |
DOMEvent | The event object of the initial event. |
startdrag
- Source:
Is fired when a user starts dragging.
Parameters:
Name | Type | Description |
---|---|---|
event |
DOMEvent | The native DOM event. |
stopcapture
- Source:
- Inherited From:
Capturing stopped.
Parameters:
Name | Type | Description |
---|---|---|
state |
object | An internal state object. |
event |
DOMEvent | The event object of the current event. |
stopdrag
- Source:
Is fired when a user stops dragging.
Parameters:
Name | Type | Description |
---|---|---|
event |
DOMEvent | The native DOM event. |