mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Droppable: Added greedy option back in
This commit is contained in:
parent
894d4c157a
commit
b329fb891d
21
ui/jquery.ui.droppable.js
vendored
21
ui/jquery.ui.droppable.js
vendored
@ -38,7 +38,7 @@ $.widget( "ui.droppable", {
|
||||
|
||||
options: {
|
||||
accept: null,
|
||||
// greedy: false,
|
||||
greedy: false,
|
||||
tolerance: "intersect"
|
||||
},
|
||||
|
||||
@ -94,8 +94,25 @@ $.widget( "ui.droppable", {
|
||||
},
|
||||
|
||||
_stop: function( event ) {
|
||||
|
||||
var greedy_child,
|
||||
self = this;
|
||||
|
||||
if ( this.over ) {
|
||||
this._trigger( "drop", event, this._uiHash() );
|
||||
|
||||
this.element.find(":data('" + this.widgetFullName + "')").each( function() {
|
||||
|
||||
var drop = $(this).data( self.widgetFullName );
|
||||
|
||||
if ( drop.options.greedy === true && drop.over === true ) {
|
||||
greedy_child = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if ( !greedy_child ) {
|
||||
this._trigger( "drop", event, this._uiHash() );
|
||||
}
|
||||
}
|
||||
|
||||
this._trigger( "deactivate", event, this._uiHash() );
|
||||
|
Loading…
Reference in New Issue
Block a user