photonui.Slider Class
Slider
Constructor
photonui.Slider
(
-
params
Parameters:
-
params
ObjectAn object that can contain any property of the widget (optional).
Item Index
Methods
- __debValueChangedFinal
- __forValueChangedFinal
- __onChange
- __onContextMenu
- __onFieldContextMenu
- __onKeydown
- __onKeypress
- __onKeyup
- __onLocaleChanged
- __onMouseWheel
- __onSliderMouseDown
- __onSliderMouseMove
- __onSliderMouseUp
- __onSliderMouseWheel
- __onSliderTouchEnd
- __onSliderTouchMove
- __onSliderTouchStart
- _bindEvent
- _bindFieldEvents
- _buildHtml
- _callCallbacks
- _moveTouchEnd
- _registerWEvents
- _unbindEvent
- _updateFieldValue
- _updateFromMouseEvent
- _updateProperties deprecated
- _updateValue
- _validateInput
- _visibilityChanged
- addClass
- destroy
- hide
- registerCallback
- removeCallback
- removeClass
- show
- unparent
Methods
__debValueChangedFinal
()
private
Debounced version of __forValueChangedFinal.
__forValueChangedFinal
()
private
To be called indirectly through __debValueChangedFinal().
__onContextMenu
(
private
-
event
Called when the context menu should be displayed.
Parameters:
-
event
Object
__onLocaleChanged
()
private
Called when the locale is changed.
_bindEvent
(
private
-
id
-
element
-
evName
-
callback
-
[options]
Javascript event binding (for internal use).
Parameters:
_bindFieldEvents
()
private
Bind Field events.
_buildHtml
()
private
Build the widget HTML.
_callCallbacks
(
private
-
wEvent
-
params
Call all callbacks for the given wEvent.
NOTE: the first argument passed to the callback is the current widget.
NOTEĀ²: if the thisArg of the callback is null, this will be binded to the current widget.
_moveTouchEnd
(
private
-
event
Gets the first touch event and normalizes pageX/Y and offsetX/Y properties.
Parameters:
-
event
Object
_updateFieldValue
()
private
Update the value in the html field.
_updateFromMouseEvent
(
private
-
event
Update the value form a mouse event occured on the slider.
Parameters:
-
event
Object
_updateProperties
(
deprecated
private
-
properties
Force the update of the given properties.
This method is deprecated.
One should use '@photonui-update' abitbol's annotation on concerned properties.
Parameters:
-
properties
ArrayThe properties to update.
_updateValue
(
private
-
value
Update the value (in the widget).
_validateInput
(
Boolean
private
-
value
Validate the user inputs.
Parameters:
-
value
String
Returns:
_visibilityChanged
(
private
-
visibility
Called when the visibility changes.
Parameters:
-
visibility
BooleanCurrent visibility state (otptional, defaut=this.visible)
addClass
(
-
className
Add a class to the outer HTML element of the widget.
Parameters:
-
className
StringThe class to add.
destroy
()
Destroy the widget.
hide
()
Hide the widget (equivalent to widget.visible = false).
registerCallback
(
-
id
-
wEvent
-
callback
-
thisArg
Register a callback for any PhotonUI/Widget event (called wEvent).
Callback signature:
function (Object(Base/Widget) [, arg1 [, arg2 [, ...]]])
removeClass
(
-
className
Remove a class from the outer HTML element of the widget.
Parameters:
-
className
StringThe class to remove.
show
()
Display the widget (equivalent to widget.visible = true).
unparent
()
Detache the widget from its parent.
Properties
__events
Object
private
Object containing references javascript events binding (for widget
internal use).
contextMenuName
String
The name of the managed contextual menu (
photonui.PopupWindow().name
).
Default: null (= no context menu)
max
Number
default null (no maximum);
The maximum value of the field.
min
Number
default null (no minimum);
The minimum value of the field.
step
Number
default 1
The incrementation step of the field.