_bindClickableRail
protected
void
_bindClickableRail
(
)
Attaches DOM event subscribers to support rail interaction.
_defRailMouseDownFn
protected
void
_defRailMouseDownFn
(
e
)
Default behavior for the railMouseDown event. Centers the thumb at
the click location and passes control to the DDM to behave as though
the thumb itself were clicked in preparation for a drag operation.
- Parameters:
-
e <Event>
the EventFacade for the railMouseDown custom event
_getThumbDestination
protected
Array
_getThumbDestination
(
e
,
node
)
Calculates the top left position the thumb should be moved to to
align the click XY with the center of the specified node.
- Parameters:
-
e <DOMEvent>
The mousedown event object -
node <Node>
The node to position
- Returns:
Array
- the [top, left] pixel position of the destination
_initClickableRail
protected
void
_initClickableRail
(
)
Initializes the internal state and sets up events.
_onRailMouseDown
protected
void
_onRailMouseDown
(
e
)
Dispatches the railMouseDown event.
- Parameters:
-
e <DOMEvent>
the mousedown event object
_resolveThumb
protected
Y.DD.Drag
_resolveThumb
(
e
)
Resolves which thumb to actuate if any. Override this if you want to
support multiple thumbs. By default, returns the Drag instance for
the thumb stored by the Slider.
- Parameters:
-
e <DOMEvent>
the mousedown event object
- Returns:
Y.DD.Drag
- the Drag instance that should be moved
_unbindClickableRail
protected
void
_unbindClickableRail
(
)
Detaches DOM event subscribers for cleanup/destruction cycle.