clickable-rail-debug.js revision a79d36e65c99c6422a9eb88d1fc3be127e92b391
b39897a381c2203466da5568bfd2862a54a81311Adam Moore * Adds support for mouse interaction with the Slider rail triggering thumb
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @module slider
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @submodule clickable-rail
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * Slider extension that allows clicking on the Slider's rail element,
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * triggering the thumb to align with the location of the click.
0bc189b2acbd7c4b5af63eded0c4289e224676b7Adam Moore * @class ClickableRail
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore // Prototype methods added to host class
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * Initializes the internal state and sets up events.
b39897a381c2203466da5568bfd2862a54a81311Adam Moore * @method _initClickableRail
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @protected
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore this._evtGuid = this._evtGuid || (Y.guid() + '|');
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * Broadcasts when the rail has received a mousedown event and
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * triggers the thumb positioning. Use
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * <code>e.preventDefault()</code> or
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * <code>set("clickableRail", false)</code> to prevent
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * the thumb positioning.
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @event railMouseDown
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @preventable _defRailMouseDownFn
b39897a381c2203466da5568bfd2862a54a81311Adam Moore * Attaches DOM event subscribers to support rail interaction.
b39897a381c2203466da5568bfd2862a54a81311Adam Moore * @method _bindClickableRail
d2c45453b4a46a4be78ac4b2bae5f9a53b0bb125Adam Moore * @protected
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore this.rail.on(this._evtGuid + Y.DD.Drag.START_EVENT,
02babda6bdf56de48b7c5145d766de910bdfbc04Adam Moore * Detaches DOM event subscribers for cleanup/destruction cycle.
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @method _unbindClickableRail
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @protected
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore rail = contentBox.one('.' + this.getClassName('rail'));
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * Dispatches the railMouseDown event.
2c5ce90c334a2d0f18474e85c93b424b6ec9daaaAdam Moore * @method _onRailMouseDown
736ba5f7cc5cf8d479f8fc621ff3c0777e434c8aAdam Moore * @param e {DOMEvent} the mousedown event object
736ba5f7cc5cf8d479f8fc621ff3c0777e434c8aAdam Moore * @protected
_onRailMouseDown: function (e) {
_defRailMouseDownFn: function (e) {
e = e.ev;
xy;
if (dd) {
_resolveThumb: function (e) {
return this._dd;
ATTRS: {
value: true,