aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.droppable.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.droppable.js')
-rw-r--r--ui/jquery.ui.droppable.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index 9d904992d..e2da0b9f6 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -16,6 +16,10 @@
*/
(function( $, undefined ) {
+function isOverAxis( x, reference, size ) {
+ return ( x > reference ) && ( x < ( reference + size ) );
+}
+
$.widget("ui.droppable", {
version: "@VERSION",
widgetEventPrefix: "drop",
@@ -203,7 +207,7 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
case 'pointer':
draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
- return $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
+ return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
case 'touch':
return (
(y1 >= t && y1 <= b) || // Top edge touching