aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.droppable.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-12-06 14:42:10 -0500
committerScott González <scott.gonzalez@gmail.com>2012-12-06 14:42:10 -0500
commit3ec0c2e5728da9b9b9955dfe18073d3985e61a52 (patch)
treed031620704fde888e044b0f8f562f89ebcea08a6 /ui/jquery.ui.droppable.js
parentb239298946b466a0c87a0c1ead4ccd75141ed740 (diff)
downloadjquery-ui-3ec0c2e5728da9b9b9955dfe18073d3985e61a52.tar.gz
jquery-ui-3ec0c2e5728da9b9b9955dfe18073d3985e61a52.zip
Core: Removed $.ui.isOver() and $.ui.isOverAxis(). Fixes #8891 - Remove $.ui.isOver() and $.ui.isOverAxis().
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..aebca8fae 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