From 43a93e5c338777599d0c64603e63686ed332fe36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 7 Jan 2012 11:50:16 -0500 Subject: [PATCH] Droppable: Cleanup. --- ui/jquery.ui.droppable.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js index 202b438d0..714a8ec2f 100644 --- a/ui/jquery.ui.droppable.js +++ b/ui/jquery.ui.droppable.js @@ -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; @@ -121,17 +119,15 @@ $.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?