]> source.dussan.org Git - jquery-ui.git/commitdiff
Droppable: Use `$.ui.intersect()`
authorEvelyn Masso <evoutofambit@gmail.com>
Sat, 1 Oct 2016 22:47:36 +0000 (15:47 -0700)
committerScott González <scott.gonzalez@gmail.com>
Mon, 3 Oct 2016 13:16:41 +0000 (09:16 -0400)
Fixes #14963

ui/widgets/droppable.js

index 67bcb693d25f748e3d78a693727d34bdc6342fbf..89bff2511b7c0579d934a9c3c7dade611e12ee0d 100644 (file)
@@ -199,7 +199,7 @@ $.widget( "ui.droppable", {
                                        inst.accept.call(
                                                inst.element[ 0 ], ( draggable.currentItem || draggable.element )
                                        ) &&
-                                       intersect(
+                                       $.ui.intersect(
                                                draggable,
                                                $.extend( inst, { offset: inst.element.offset() } ),
                                                inst.options.tolerance, event
@@ -253,7 +253,7 @@ $.widget( "ui.droppable", {
        }
 } );
 
-var intersect = $.ui.intersect = ( function() {
+$.ui.intersect = ( function() {
        function isOverAxis( x, reference, size ) {
                return ( x >= reference ) && ( x < ( reference + size ) );
        }
@@ -361,7 +361,7 @@ $.ui.ddmanager = {
                                return;
                        }
                        if ( !this.options.disabled && this.visible &&
-                                       intersect( draggable, this, this.options.tolerance, event ) ) {
+                                       $.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
                                dropped = this._drop.call( this, event ) || dropped;
                        }
 
@@ -402,7 +402,7 @@ $.ui.ddmanager = {
                        }
 
                        var parentInstance, scope, parent,
-                               intersects = intersect( draggable, this, this.options.tolerance, event ),
+                               intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
                                c = !intersects && this.isover ?
                                        "isout" :
                                        ( intersects && !this.isover ? "isover" : null );