Changeset 1171

Show
Ignore:
Timestamp:
12/17/08 11:35:13 (15 months ago)
Author:
paul.bakaus
Message:

sortable: removed default tolerance "guess" for the simplier (and better working) default mode, and the plain "pointer" intersection

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.sortable.js

    r1170 r1171  
    211211                                this.direction = intersection == 1 ? "down" : "up"; 
    212212 
    213                                 if (this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this._intersectsGuess(item))) { 
     213                                if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) { 
    214214                                        this.options.sortIndicator.call(this, event, item); 
     215                                } else { 
     216                                        break; 
    215217                                } 
    216218 
     
    349351                if(        this.options.tolerance == "pointer" 
    350352                        || this.options.forcePointerForContainers 
    351                         || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height']) 
     353                        || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height']) 
    352354                ) { 
    353355                        return isOverElement; 
     
    379381        }, 
    380382 
    381         _intersectsGuess: function(item) { 
     383        _intersectsWithSides: function(item) { 
    382384 
    383385                var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), 
     
    907909                scrollSpeed: 20, 
    908910                sortIndicator: $.ui.sortable.prototype._rearrange, 
    909                 tolerance: "guess", 
     911                tolerance: "default", 
    910912                zIndex: 1000 
    911913        }