public/javascripts/yui/dragdrop/dragdrop-debug.js
function(pt, oTarget, intersect, curRegion) {
            // use cache if available
            var loc = this.locationCache[oTarget.id];
            if (!loc || !this.useCache) {
                YAHOO.log("cache not populated", "info", "DragDropMgr");
                loc = this.getLocation(oTarget);
                this.locationCache[oTarget.id] = loc;

                YAHOO.log("cache: " + loc, "info", "DragDropMgr");
            }

            if (!loc) {
                YAHOO.log("could not get the location of the element", "info", "DragDropMgr");
                return false;
            }

            //YAHOO.log("loc: " + loc + ", pt: " + pt);
            oTarget.cursorIsOver = loc.contains( pt );

            // DragDrop is using this as a sanity check for the initial mousedown
            // in this case we are done.  In POINT mode, if the drag obj has no
            // contraints, we are done. Otherwise we need to evaluate the 
            // region the target as occupies to determine if the dragged element
            // overlaps with it.
            
            var dc = this.dragCurrent;
            if (!dc || (!intersect && !dc.constrainX && !dc.constrainY)) {

                //if (oTarget.cursorIsOver) {
                    //YAHOO.log("over " + oTarget + ", " + loc + ", " + pt, "warn");
                //}
                return oTarget.cursorIsOver;
            }

            oTarget.overlap = null;


            // Get the current location of the drag element, this is the
            // location of the mouse event less the delta that represents
            // where the original mousedown happened on the element.  We
            // need to consider constraints and ticks as well.

            if (!curRegion) {
                var pos = dc.getTargetCoord(pt.x, pt.y);
                var el = dc.getDragEl();
                curRegion = new YAHOO.util.Region( pos.y, 
                                                   pos.x + el.offsetWidth,
                                                   pos.y + el.offsetHeight, 
                                                   pos.x );
            }

            var overlap = curRegion.intersect(loc);

            if (overlap) {
                oTarget.overlap = overlap;
                return (intersect) ? true : oTarget.cursorIsOver;
            } else {
                return false;
            }
        }
function(pt, oTarget, intersect, curRegion) {
            // use cache if available
            var loc = this.locationCache[oTarget.id];
            if (!loc || !this.useCache) {
                YAHOO.log("cache not populated", "info", "DragDropMgr");
                loc = this.getLocation(oTarget);
                this.locationCache[oTarget.id] = loc;

                YAHOO.log("cache: " + loc, "info", "DragDropMgr");
            }

            if (!loc) {
                YAHOO.log("could not get the location of the element", "info", "DragDropMgr");
                return false;
            }

            //YAHOO.log("loc: " + loc + ", pt: " + pt);
            oTarget.cursorIsOver = loc.contains( pt );

            // DragDrop is using this as a sanity check for the initial mousedown
            // in this case we are done.  In POINT mode, if the drag obj has no
            // contraints, we are done. Otherwise we need to evaluate the 
            // region the target as occupies to determine if the dragged element
            // overlaps with it.
            
            var dc = this.dragCurrent;
            if (!dc || (!intersect && !dc.constrainX && !dc.constrainY)) {

                //if (oTarget.cursorIsOver) {
                    //YAHOO.log("over " + oTarget + ", " + loc + ", " + pt, "warn");
                //}
                return oTarget.cursorIsOver;
            }

            oTarget.overlap = null;


            // Get the current location of the drag element, this is the
            // location of the mouse event less the delta that represents
            // where the original mousedown happened on the element.  We
            // need to consider constraints and ticks as well.

            if (!curRegion) {
                var pos = dc.getTargetCoord(pt.x, pt.y);
                var el = dc.getDragEl();
                curRegion = new YAHOO.util.Region( pos.y, 
                                                   pos.x + el.offsetWidth,
                                                   pos.y + el.offsetHeight, 
                                                   pos.x );
            }

            var overlap = curRegion.intersect(loc);

            if (overlap) {
                oTarget.overlap = overlap;
                return (intersect) ? true : oTarget.cursorIsOver;
            } else {
                return false;
            }
        }
function ( pt , oTarget , intersect , curRegion ) { // use cache if available var loc = this . locationCache [ oTarget . id ] ; if ( ! loc || ! this . useCache ) { YAHOO . log ( "cache not populated" , "info" , "DragDropMgr" ) ; loc = this . getLocation ( oTarget ) ; this . locationCache [ oTarget . id ] = loc ; YAHOO . log ( "cache: " + loc , "info" , "DragDropMgr" ) ; } if ( ! loc ) { YAHOO . log ( "could not get the location of the element" , "info" , "DragDropMgr" ) ; return false ; } //YAHOO.log("loc: " + loc + ", pt: " + pt); oTarget . cursorIsOver = loc . contains ( pt ) ; // DragDrop is using this as a sanity check for the initial mousedown // in this case we are done.  In POINT mode, if the drag obj has no // contraints, we are done. Otherwise we need to evaluate the  // region the target as occupies to determine if the dragged element // overlaps with it. var dc = this . dragCurrent ; if ( ! dc || ( ! intersect && ! dc . constrainX && ! dc . constrainY ) ) { //if (oTarget.cursorIsOver) { //YAHOO.log("over " + oTarget + ", " + loc + ", " + pt, "warn"); //} return oTarget . cursorIsOver ; } oTarget . overlap = null ; // Get the current location of the drag element, this is the // location of the mouse event less the delta that represents // where the original mousedown happened on the element.  We // need to consider constraints and ticks as well. if ( ! curRegion ) { var pos = dc . getTargetCoord ( pt . x , pt . y ) ; var el = dc . getDragEl ( ) ; curRegion = new YAHOO . util . Region ( pos . y , pos . x + el . offsetWidth , pos . y + el . offsetHeight , pos . x ) ; } var overlap = curRegion . intersect ( loc ) ; if ( overlap ) { oTarget . overlap = overlap ; return ( intersect ) ? true : oTarget . cursorIsOver ; } else { return false ; } }
Checks the cursor location to see if it over the target
@method isOverTarget
@param {YAHOO.util.Point} pt The point to evaluate
@param {DragDrop} oTarget the DragDrop object we are inspecting
@param {boolean} intersect true if we are in intersect mode
@param {YAHOO.util.Region} pre-cached location of the dragged element
@return {boolean} true if the mouse is over the target
@private
@static
Checks the cursor location to see if it over the target