Protected
_limit0Protected
_limit1Protected
_majorProtected
_minorProtected
_s2ticksProtected
_t01The event handler for this control. Although it is permitted to set
this property directly it is recommended that the setAction(...)
method is used to define the event handler actions.
Add a child to this control using its relative position [rx, ry]. If rx and ry are not provided then it uses the values set in the child.
this control
is the actual control or its name
Optional
rx: numberOptional
ry: numberSet or get the corner radii used for this control
an array with the 4 corner radii
an array of 4 corner radii
Disables this control
this control
Optional
cascade: booleanif true disable child controls
Enables this control
this control
Optional
cascade: booleanif true enable child controls
If the turn angle is < 360° then there will be an 'unused' section of track. This is called the gap and this method sets the position of the gap center effectively rotating the whole knob.
The angle is 0° along positive x-axis and increases clockwise. The default value is 90° which means the gap center is facing south.
this control
must be in the range ≥ 0 and ≤ 360
this controls parent
Make this control invisible
this control
Optional
cascade: booleanif true hide children
Remove this control from its parent
this control
Sets the interaction mode for rotating the knob.
'x'
: dragging left and right turns the knob anticlockwise and clockwise respectively.'y'
: dragging down and up turns the knob anticlockwise and clockwise respectively.'a'
: dragging in a circular motion round the knob center turns the knob to face the drag point.Rotation is constrained within the maximum turn angle for this knob.
Any other parameter value is ignored and the mode is unchanged.
this control
'x', 'y' or 'a'
Makes the controls background opaque. The actual color depends on the controls color scheme
this control
Specify the orientation to show this control
this control
'north', 'south', 'east' or 'west'
Adds this control to another control which becomes its parent
this control
is the parental control or its name
Optional
rx: numberx position relative to parent
Optional
ry: numbery position relative to parent
Remove a child control from this one so that it stays in same screen position
this control
the control to remove or its name
Only applies to modes 'x' and 'y'. It controls how far the knob rotates for a given drag distance.
The drag distance needed to rotate the knob by the maximum turn
angle is the reciprocal of the parameter value i.e. 1.0 / sens
.
The default value is 0.005 which equates to a drag distance of 200 pixels and the minimum permitted value is 0.0025 (400 pixels).
this control
≥0.0025
This sets the event handler to be used when this control fires an event. The parameter can take three forms:
this control
the function to handle this controls event
Make this control visible
this control
Optional
cascade: booleanif true show children
Shrink the control to fit contents.
To shrink on one dimension only pass either 'w' (width) or 'h' (height) to indicate which dimmension to shrink
this control
Optional
dim: stringthe dimension to shrink
The track can be divided up into a number of domains separated with major ticks. The major domains and be further divided into subdomains separated with minor ticks. If the final parameter is true then values returned by the slider are consrained to the tick values.
this slider object
the number of major domains on the track
the number of minor domains between major ticks
Optional
stick2ticks: booleanslider value is constrainged to tick values
Sets the width of the track surrounding the central knob-grip. The value will be constrained so the minimum width is 6 pixels upto the radius of the knob.
The track is used to display current value bar as well as any user specified ticks.
this control
the width of the value track
Makes the controls background fully transparent.
this control
If the parameter value is withing the slider limits it will move the thumb to the appropriate position. If no parameter is passed or is outside the limits this methods returns the current slider value.
the current value or this slider object
Optional
value: numberthe selected value to be set
Generated using TypeDoc
This class represents a turnable knob with a surrounding status track (optional). Three modes are available to rotate the knob.
Major and minor tick marks can be added to the status track and supports stick-to-ticks if wanted.
Since
1.1.0