Skip to content
Permalink
Browse files

sortable: fixed issue with dropOnEmpty not working, tolerance "guess"…

… wasn't checked in the intersectsWith container method.
  • Loading branch information
Paul Bakaus
Paul Bakaus committed Jun 5, 2008
1 parent a91370e commit 7a64afb4e36594ec549ad71b640d41a1b137e1fe
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/source/ui.sortable.js
@@ -94,7 +94,7 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
var l = item.left, r = l + item.width,
t = item.top, b = t + item.height;

if(this.options.tolerance == "pointer") {
if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
return (y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r);
} else {

@@ -112,7 +112,7 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
var l = item.left, r = l + item.width,
t = item.top, b = t + item.height;

if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.currentItem[0]['offset'+(this.floating ? 'Width' : 'Height')] > item.item[0]['offset'+(this.floating ? 'Width' : 'Height')])) {
if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {

if(!(y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r)) return false;

0 comments on commit 7a64afb

Please sign in to comment.
You can’t perform that action at this time.