Changeset 1170

Show
Ignore:
Timestamp:
12/17/08 11:24:06 (15 months ago)
Author:
eduardolundgren
Message:

Sortable accurateIntersection using outerWidth/outerHeight

Files:
1 modified

Legend:

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

    r1096 r1170  
    100100                //Cache the margins of the original element 
    101101                this._cacheMargins(); 
    102                  
     102 
    103103                //Get the next scrolling parent 
    104104                this.scrollParent = this.helper.scrollParent(); 
     
    106106                //The element's absolute position on the page minus margins 
    107107                this.offset = this.currentItem.offset(); 
     108 
    108109                this.offset = { 
    109110                        top: this.offset.top - this.margins.top, 
    110111                        left: this.offset.left - this.margins.left 
    111112                }; 
    112                  
     113 
    113114                // Only after we got the offset, we can change the helper's position to absolute 
    114115                // TODO: Still need to figure out a way to make relative sorting possible 
     
    142143                //Create the placeholder 
    143144                this._createPlaceholder(); 
    144                  
     145 
    145146                //Set a containment if given in the options 
    146147                if(o.containment) 
     
    512513                        if (!fast) { 
    513514                                if (this.options.accurateIntersection) { 
    514                                         item.width = t.width(); 
    515                                         item.height = t.height(); 
     515                                        item.width = t.outerWidth(); 
     516                                        item.height = t.outerHeight(); 
    516517                                } 
    517518                                else { 
     
    945946        }, 
    946947        sort: function(event, ui) { 
    947          
     948 
    948949                var i = $(this).data("sortable"), o = i.options, scrolled = false; 
    949950