Bug Tracker

Changeset 3826

Show
Ignore:
Timestamp:
11/14/07 22:22:31 (1 year ago)
Author:
brandon.aaron
Message:

Fix for #1921 (adds dimensions dependency to ui.mousejs)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/current/ui.mouse.js

    r3611 r3826  
    181181 
    182182            if(o._start) o._start.apply(a, [this.helper, this.pos, o.cursorAt, this, e]); // Trigger the start callback 
    183             this.helperSize = { width: outerWidth(this.helper), height: outerHeight(this.helper) }; //Set helper size property 
     183            this.helperSize = { width: $(this.helper).outerWidth(), height: $(this.helper).outerHeight() }; //Set helper size property 
    184184            return false; 
    185185                         
     
    235235    }); 
    236236 
    237     var num = function(el, prop) { 
    238         return parseInt($.css(el.jquery?el[0]:el,prop))||0; 
    239     }; 
    240     function outerWidth(el) { 
    241         var $el = $(el), ow = $el.width(); 
    242         for (var i = 0, props = ['borderLeftWidth', 'paddingLeft', 'paddingRight', 'borderRightWidth']; i < props.length; i++) 
    243             ow += num($el, props[i]); 
    244         return ow; 
    245     } 
    246     function outerHeight(el) { 
    247         var $el = $(el), oh = $el.width(); 
    248         for (var i = 0, props = ['borderTopWidth', 'paddingTop', 'paddingBottom', 'borderBottomWidth']; i < props.length; i++) 
    249             oh += num($el, props[i]); 
    250         return oh; 
    251     } 
    252  
    253237 })(jQuery);