public/javascripts/yui/slider/slider.js
function(finalCoord) {

        var t = this.thumb,
            self = this,
            nextCoord = null,
            tmpX, tmpY;

        if (t._isRegion) {
            nextCoord = this._getNextX(this.curCoord, finalCoord);
            tmpX = (nextCoord !== null) ? nextCoord[0] : this.curCoord[0];
            nextCoord = this._getNextY(this.curCoord, finalCoord);
            tmpY = (nextCoord !== null) ? nextCoord[1] : this.curCoord[1];

            nextCoord = tmpX !== this.curCoord[0] || tmpY !== this.curCoord[1] ?
                [ tmpX, tmpY ] : null;
        } else if (t._isHoriz) {
            nextCoord = this._getNextX(this.curCoord, finalCoord);
        } else {
            nextCoord = this._getNextY(this.curCoord, finalCoord);
        }


        if (nextCoord) {

            // cache the position
            this.curCoord = nextCoord;

            // move to the next coord
            this.thumb.alignElWithMouse(t.getEl(), nextCoord[0] + this.thumbCenterPoint.x, nextCoord[1] + this.thumbCenterPoint.y);
            
            // check if we are in the final position, if not make a recursive call
            if (!(nextCoord[0] == finalCoord[0] && nextCoord[1] == finalCoord[1])) {
                setTimeout(function() { self.moveOneTick(finalCoord); }, 
                        this.tickPause);
            } else {
                this.unlock();
                if (!this._mouseDown) {
                    this.endMove();
                }
            }
        } else {
            this.unlock();
            if (!this._mouseDown) {
                this.endMove();
            }
        }
    }
function(finalCoord) {

        var t = this.thumb,
            self = this,
            nextCoord = null,
            tmpX, tmpY;

        if (t._isRegion) {
            nextCoord = this._getNextX(this.curCoord, finalCoord);
            tmpX = (nextCoord !== null) ? nextCoord[0] : this.curCoord[0];
            nextCoord = this._getNextY(this.curCoord, finalCoord);
            tmpY = (nextCoord !== null) ? nextCoord[1] : this.curCoord[1];

            nextCoord = tmpX !== this.curCoord[0] || tmpY !== this.curCoord[1] ?
                [ tmpX, tmpY ] : null;
        } else if (t._isHoriz) {
            nextCoord = this._getNextX(this.curCoord, finalCoord);
        } else {
            nextCoord = this._getNextY(this.curCoord, finalCoord);
        }


        if (nextCoord) {

            // cache the position
            this.curCoord = nextCoord;

            // move to the next coord
            this.thumb.alignElWithMouse(t.getEl(), nextCoord[0] + this.thumbCenterPoint.x, nextCoord[1] + this.thumbCenterPoint.y);
            
            // check if we are in the final position, if not make a recursive call
            if (!(nextCoord[0] == finalCoord[0] && nextCoord[1] == finalCoord[1])) {
                setTimeout(function() { self.moveOneTick(finalCoord); }, 
                        this.tickPause);
            } else {
                this.unlock();
                if (!this._mouseDown) {
                    this.endMove();
                }
            }
        } else {
            this.unlock();
            if (!this._mouseDown) {
                this.endMove();
            }
        }
    }
function ( finalCoord ) { var t = this . thumb , self = this , nextCoord = null , tmpX , tmpY ; if ( t . _isRegion ) { nextCoord = this . _getNextX ( this . curCoord , finalCoord ) ; tmpX = ( nextCoord !== null ) ? nextCoord [ 0 ] : this . curCoord [ 0 ] ; nextCoord = this . _getNextY ( this . curCoord , finalCoord ) ; tmpY = ( nextCoord !== null ) ? nextCoord [ 1 ] : this . curCoord [ 1 ] ; nextCoord = tmpX !== this . curCoord [ 0 ] || tmpY !== this . curCoord [ 1 ] ? [ tmpX , tmpY ] : null ; } else if ( t . _isHoriz ) { nextCoord = this . _getNextX ( this . curCoord , finalCoord ) ; } else { nextCoord = this . _getNextY ( this . curCoord , finalCoord ) ; } if ( nextCoord ) { // cache the position this . curCoord = nextCoord ; // move to the next coord this . thumb . alignElWithMouse ( t . getEl ( ) , nextCoord [ 0 ] + this . thumbCenterPoint . x , nextCoord [ 1 ] + this . thumbCenterPoint . y ) ; // check if we are in the final position, if not make a recursive call if ( ! ( nextCoord [ 0 ] == finalCoord [ 0 ] && nextCoord [ 1 ] == finalCoord [ 1 ] ) ) { setTimeout ( function ( ) { self . moveOneTick ( finalCoord ) ; } , this . tickPause ) ; } else { this . unlock ( ) ; if ( ! this . _mouseDown ) { this . endMove ( ) ; } } } else { this . unlock ( ) ; if ( ! this . _mouseDown ) { this . endMove ( ) ; } } }
Move the slider one tick mark towards its final coordinate.  Used
for the animation when tick marks are defined
@method moveOneTick
@param {int[]} the destination coordinate
@private
Move the slider one tick mark towards its final coordinate . Used for the animation when tick marks are defined