Class HorizontalSlider
represents horizontal slider
Defined in: raphaeltools.src.js.
Constructor Attributes | Constructor Name and Description |
---|---|
HorizontalSlider(raphael, params)
Horizontal slider
|
Field Attributes | Field Name and Description |
---|---|
Circle
|
|
gap between end of the slider's line and the slider's circle when the circle is at extreme position
|
|
initial value
|
|
len of slider [pixels]
|
|
length span of getable values
|
|
line
|
|
raphael instance
|
|
radius of slider's circle
|
|
value when the slider is at the very beginning
|
|
value when the slider is at the very end
|
|
x coordinate of left/upper end
|
|
z coordinate of left/upper end
|
Method Attributes | Method Name and Description |
---|---|
<static> |
HorizontalSlider.create(raphael, params)
Creates new HorizontalSlider object, for parameters meaning see HorizontalSlider
|
getVal()
Get current value from receiver
|
|
onmove()
What to do when moving.
|
|
setVal(newVal)
Set value to receiver
|
Class Detail
HorizontalSlider(raphael, params)
Horizontal slider
- Parameters:
- {Raphael} raphael
- raphael instance
- {Object} params
- parameters, see below
- {float} params.x Optional, Default: 100.
- x coordinate of left/upper end
- {float} params.z Optional, Default: 100.
- z coordinate of left/upper end
- {float} params.length Optional, Default: 100.
- length of slider [pixels]
- {float} params.rcirc Optional, Default: 5.
- radius of slider's circle
- {float} params.val1 Optional, Default: 0.
- value when the slider is at the very beginning
- {float} params.val2 Optional, Default: 1.
- value when the slider is at the very end
- {float} params.initVal Optional, Default: (val1+val2)/2
- initial value
- {float} params.gap Optional, Default: 3.
- gap between end of the slider's line and the slider's circle when the circle is at extreme position
Field Detail
circ
Circle
gap
gap between end of the slider's line and the slider's circle when the circle is at extreme position
initVal
initial value
len
len of slider [pixels]
lenVals
length span of getable values
line
line
raphael
raphael instance
rcirc
radius of slider's circle
val1
value when the slider is at the very beginning
val2
value when the slider is at the very end
x
x coordinate of left/upper end
z
z coordinate of left/upper end
Method Detail
<static>
{HorizontalSlider}
HorizontalSlider.create(raphael, params)
Creates new HorizontalSlider object, for parameters meaning see HorizontalSlider
- Parameters:
- raphael
- params
- Returns:
- {HorizontalSlider} new HorizontalSlider object
{float}
getVal()
Get current value from receiver
- Returns:
- {float} current value
onmove()
What to do when moving. Initially empty function, overwrite it by desired actions
setVal(newVal)
Set value to receiver
- Parameters:
- {float} newVal
- value