Droppable: Cleanup.

This commit is contained in:
Scott González 2012-01-07 11:50:16 -05:00
parent 5d029ffab0
commit 43a93e5c33

View File

@ -92,10 +92,8 @@ $.widget( "ui.droppable", {
_handleIntersect: function( event, edges, ui ) {
var xDiff = edges.draggableRight - this.offset.left,
yDiff = edges.draggableBottom - this.offset.top,
// Round to normalize between browsers since some handle non-integer values
xHalfway = Math.round( this.proportions.width / 2 ),
yHalfway = Math.round( this.proportions.height / 2 ),
xHalfway = this.proportions.width / 2,
yHalfway = this.proportions.height / 2,
xOverlap = false,
yOverlap = false;
@ -122,16 +120,14 @@ $.widget( "ui.droppable", {
return xOverlap && yOverlap;
},
// Determines if draggable is over droppable based on touch tolerance
// Determines if draggable is over droppable based on pointer tolerance
_handlePointer: function( event, edges, ui ) {
var xOverlap = event.pageX >= this.offset.left &&
event.pageX <= edges.right,
yOverlap = event.pageY >= this.offset.top &&
event.pageY <= edges.bottom;
return xOverlap && yOverlap;
},
// TODO: shouldn't this be dragStop?