Slider extension that allows clicking on the Slider's rail element, triggering the thumb to align with the location of the click.
_bindClickableRailAttaches DOM event subscribers to support rail interaction.
_defRailMouseDownFne
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.
e
Event
the EventFacade for the railMouseDown custom event
_getThumbDestinatione
node
Calculates the top left position the thumb should be moved to to align the click XY with the center of the specified node.
e
DOMEvent
The mousedown event object
node
Node
The node to position
the [top, left] pixel position of the destination
_initClickableRailInitializes the internal state and sets up events.
_onRailMouseDowne
Dispatches the railMouseDown event.
e
DOMEvent
the mousedown event object
_resolveThumbe
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.
e
DOMEvent
the mousedown event object
the Drag instance that should be moved
_unbindClickableRailDetaches DOM event subscribers for cleanup/destruction cycle.
clickableRailEnable or disable clickable rail support.
Default: true
clickableRailChange
Fires when the value for the configuration attribute clickableRail is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
railMouseDownBroadcasts when the rail has received a mousedown event and
triggers the thumb positioning. Use
e.preventDefault() or
set("clickableRail", false) to prevent
the thumb positioning.