public/javascripts/yui/dragdrop/dragdrop-debug.js
function(e, oDD) {

        var button = e.which || e.button;
        this.logger.log("button: " + button);

        if (this.primaryButtonOnly && button > 1) {
            this.logger.log("Mousedown was not produced by the primary button");
            return;
        }

        if (this.isLocked()) {
            this.logger.log("Drag and drop is disabled, aborting");
            return;
        }

        this.logger.log("mousedown " + this.id);

        this.logger.log("firing onMouseDown events");

        // firing the mousedown events prior to calculating positions
        var b4Return = this.b4MouseDown(e),
        b4Return2 = true;

        if (this.events.b4MouseDown) {
            b4Return2 = this.fireEvent('b4MouseDownEvent', e);
        }
        var mDownReturn = this.onMouseDown(e),
            mDownReturn2 = true;
        if (this.events.mouseDown) {
            mDownReturn2 = this.fireEvent('mouseDownEvent', e);
        }

        if ((b4Return === false) || (mDownReturn === false) || (b4Return2 === false) || (mDownReturn2 === false)) {
            this.logger.log('b4MouseDown or onMouseDown returned false, exiting drag');
            return;
        }

        this.DDM.refreshCache(this.groups);
        // var self = this;
        // setTimeout( function() { self.DDM.refreshCache(self.groups); }, 0);

        // Only process the event if we really clicked within the linked 
        // element.  The reason we make this check is that in the case that 
        // another element was moved between the clicked element and the 
        // cursor in the time between the mousedown and mouseup events. When 
        // this happens, the element gets the next mousedown event 
        // regardless of where on the screen it happened.  
        var pt = new YAHOO.util.Point(Event.getPageX(e), Event.getPageY(e));
        if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) )  {
                this.logger.log("Click was not over the element: " + this.id);
        } else {
            if (this.clickValidator(e)) {

                this.logger.log("click was a valid handle");

                // set the initial element position
                this.setStartPosition();

                // start tracking mousemove distance and mousedown time to
                // determine when to start the actual drag
                this.DDM.handleMouseDown(e, this);

                // this mousedown is mine
                this.DDM.stopEvent(e);
            } else {

this.logger.log("clickValidator returned false, drag not initiated");

            }
        }
    }
function(e, oDD) {

        var button = e.which || e.button;
        this.logger.log("button: " + button);

        if (this.primaryButtonOnly && button > 1) {
            this.logger.log("Mousedown was not produced by the primary button");
            return;
        }

        if (this.isLocked()) {
            this.logger.log("Drag and drop is disabled, aborting");
            return;
        }

        this.logger.log("mousedown " + this.id);

        this.logger.log("firing onMouseDown events");

        // firing the mousedown events prior to calculating positions
        var b4Return = this.b4MouseDown(e),
        b4Return2 = true;

        if (this.events.b4MouseDown) {
            b4Return2 = this.fireEvent('b4MouseDownEvent', e);
        }
        var mDownReturn = this.onMouseDown(e),
            mDownReturn2 = true;
        if (this.events.mouseDown) {
            mDownReturn2 = this.fireEvent('mouseDownEvent', e);
        }

        if ((b4Return === false) || (mDownReturn === false) || (b4Return2 === false) || (mDownReturn2 === false)) {
            this.logger.log('b4MouseDown or onMouseDown returned false, exiting drag');
            return;
        }

        this.DDM.refreshCache(this.groups);
        // var self = this;
        // setTimeout( function() { self.DDM.refreshCache(self.groups); }, 0);

        // Only process the event if we really clicked within the linked 
        // element.  The reason we make this check is that in the case that 
        // another element was moved between the clicked element and the 
        // cursor in the time between the mousedown and mouseup events. When 
        // this happens, the element gets the next mousedown event 
        // regardless of where on the screen it happened.  
        var pt = new YAHOO.util.Point(Event.getPageX(e), Event.getPageY(e));
        if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) )  {
                this.logger.log("Click was not over the element: " + this.id);
        } else {
            if (this.clickValidator(e)) {

                this.logger.log("click was a valid handle");

                // set the initial element position
                this.setStartPosition();

                // start tracking mousemove distance and mousedown time to
                // determine when to start the actual drag
                this.DDM.handleMouseDown(e, this);

                // this mousedown is mine
                this.DDM.stopEvent(e);
            } else {

this.logger.log("clickValidator returned false, drag not initiated");

            }
        }
    }
function ( e , oDD ) { var button = e . which || e . button ; this . logger . log ( "button: " + button ) ; if ( this . primaryButtonOnly && button > 1 ) { this . logger . log ( "Mousedown was not produced by the primary button" ) ; return ; } if ( this . isLocked ( ) ) { this . logger . log ( "Drag and drop is disabled, aborting" ) ; return ; } this . logger . log ( "mousedown " + this . id ) ; this . logger . log ( "firing onMouseDown events" ) ; // firing the mousedown events prior to calculating positions var b4Return = this . b4MouseDown ( e ) , b4Return2 = true ; if ( this . events . b4MouseDown ) { b4Return2 = this . fireEvent ( 'b4MouseDownEvent' , e ) ; } var mDownReturn = this . onMouseDown ( e ) , mDownReturn2 = true ; if ( this . events . mouseDown ) { mDownReturn2 = this . fireEvent ( 'mouseDownEvent' , e ) ; } if ( ( b4Return === false ) || ( mDownReturn === false ) || ( b4Return2 === false ) || ( mDownReturn2 === false ) ) { this . logger . log ( 'b4MouseDown or onMouseDown returned false, exiting drag' ) ; return ; } this . DDM . refreshCache ( this . groups ) ; // var self = this; // setTimeout( function() { self.DDM.refreshCache(self.groups); }, 0); // Only process the event if we really clicked within the linked  // element.  The reason we make this check is that in the case that  // another element was moved between the clicked element and the  // cursor in the time between the mousedown and mouseup events. When  // this happens, the element gets the next mousedown event  // regardless of where on the screen it happened.   var pt = new YAHOO . util . Point ( Event . getPageX ( e ) , Event . getPageY ( e ) ) ; if ( ! this . hasOuterHandles && ! this . DDM . isOverTarget ( pt , this ) ) { this . logger . log ( "Click was not over the element: " + this . id ) ; } else { if ( this . clickValidator ( e ) ) { this . logger . log ( "click was a valid handle" ) ; // set the initial element position this . setStartPosition ( ) ; // start tracking mousemove distance and mousedown time to // determine when to start the actual drag this . DDM . handleMouseDown ( e , this ) ; // this mousedown is mine this . DDM . stopEvent ( e ) ; } else { this . logger . log ( "clickValidator returned false, drag not initiated" ) ; } } }
Fired when this object is clicked
@method handleMouseDown
@param {Event} e
@param {YAHOO.util.DragDrop} oDD the clicked dd object (this dd obj)
@private
Fired when this object is clicked