return false;\r
\r
},\r
- //This method checks approximately if the item is dragged in a container, but doesn't touch any items\r
- inEmptyZone: function(container) {\r
-\r
- if(!$(container.options.items, container.element).length) {\r
- return container.options.dropOnEmpty ? true : false;\r
- };\r
-\r
- var last = $(container.options.items, container.element).not('.ui-sortable-helper'); last = $(last[last.length-1]);\r
- var top = last.offset()[this.floating ? 'left' : 'top'] + last[0][this.floating ? 'offsetWidth' : 'offsetHeight'];\r
- return (this.position.absolute[this.floating ? 'left' : 'top'] > top);\r
- },\r
refresh: function() {\r
this.refreshItems();\r
this.refreshPositions();\r
}\r
}\r
\r
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled\r
+ continue;\r
+ \r
//We also need to exchange the placeholder\r
if(this.placeholder) this.placeholder.remove();\r
if(this.containers[i].options.placeholder) {\r
delay: 0,\r
cancel: ":input,button",\r
items: '> *',\r
- zIndex: 1000\r
+ zIndex: 1000,\r
+ dropOnEmpty: true\r
}\r
});\r
\r