mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
parent
6a242ab4eb
commit
20a6368449
@ -191,7 +191,7 @@ $.widget( "ui.droppable", {
|
|||||||
!inst.options.disabled &&
|
!inst.options.disabled &&
|
||||||
inst.options.scope === draggable.options.scope &&
|
inst.options.scope === draggable.options.scope &&
|
||||||
inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) &&
|
inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) &&
|
||||||
$.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event )
|
intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event )
|
||||||
) { childrenIntersection = true; return false; }
|
) { childrenIntersection = true; return false; }
|
||||||
});
|
});
|
||||||
if ( childrenIntersection ) {
|
if ( childrenIntersection ) {
|
||||||
@ -224,7 +224,7 @@ $.widget( "ui.droppable", {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$.ui.intersect = (function() {
|
var intersect = (function() {
|
||||||
function isOverAxis( x, reference, size ) {
|
function isOverAxis( x, reference, size ) {
|
||||||
return ( x >= reference ) && ( x < ( reference + size ) );
|
return ( x >= reference ) && ( x < ( reference + size ) );
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ $.ui.ddmanager = {
|
|||||||
if ( !this.options ) {
|
if ( !this.options ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
|
if ( !this.options.disabled && this.visible && intersect( draggable, this, this.options.tolerance, event ) ) {
|
||||||
dropped = this._drop.call( this, event ) || dropped;
|
dropped = this._drop.call( this, event ) || dropped;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,7 +360,7 @@ $.ui.ddmanager = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var parentInstance, scope, parent,
|
var parentInstance, scope, parent,
|
||||||
intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
|
intersects = intersect( draggable, this, this.options.tolerance, event ),
|
||||||
c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null );
|
c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null );
|
||||||
if ( !c ) {
|
if ( !c ) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user