aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.sortable.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-12-17 19:35:13 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-12-17 19:35:13 +0000
commitb81c8733382c82f7680a8e085edcac8fef0b4e53 (patch)
tree44eecba7d4008e68d541b1e9938b5f9af3f971a0 /ui/ui.sortable.js
parent6b2b98cb3dc3e4cbb326a614c0c83e55b5ed9839 (diff)
downloadjquery-ui-b81c8733382c82f7680a8e085edcac8fef0b4e53.tar.gz
jquery-ui-b81c8733382c82f7680a8e085edcac8fef0b4e53.zip
sortable: removed default tolerance "guess" for the simplier (and better working) default mode, and the plain "pointer" intersection
Diffstat (limited to 'ui/ui.sortable.js')
-rw-r--r--ui/ui.sortable.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js
index edeed0e9f..b15d13ebe 100644
--- a/ui/ui.sortable.js
+++ b/ui/ui.sortable.js
@@ -210,8 +210,10 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
this.direction = intersection == 1 ? "down" : "up";
- if (this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this._intersectsGuess(item))) {
+ if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
this.options.sortIndicator.call(this, event, item);
+ } else {
+ break;
}
this._propagate("change", event); //Call plugins and callbacks
@@ -348,7 +350,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
if( this.options.tolerance == "pointer"
|| this.options.forcePointerForContainers
- || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
+ || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
) {
return isOverElement;
} else {
@@ -378,7 +380,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
},
- _intersectsGuess: function(item) {
+ _intersectsWithSides: function(item) {
var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
@@ -906,7 +908,7 @@ $.extend($.ui.sortable, {
scrollSensitivity: 20,
scrollSpeed: 20,
sortIndicator: $.ui.sortable.prototype._rearrange,
- tolerance: "guess",
+ tolerance: "default",
zIndex: 1000
}
});