Changeset 3824
- Timestamp:
- 11/14/07 20:20:00 (9 months ago)
- Files:
-
- 1 modified
-
trunk/plugins/dimensions/jquery.dimensions.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/dimensions/jquery.dimensions.js
r3581 r3824 27 27 borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right 28 28 29 return num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);29 return this.is(':visible') ? this[0]['client' + name] : num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr); 30 30 }; 31 31 … … 39 39 options = $.extend({ margin: false }, options || {}); 40 40 41 return num( this, name.toLowerCase() ) 42 + num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width') 43 + num(this, 'padding' + torl) + num(this, 'padding' + borr) 44 + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0); 41 var val = this.is(':visible') ? 42 this[0]['offset' + name] : 43 num( this, name.toLowerCase() ) 44 + num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width') 45 + num(this, 'padding' + torl) + num(this, 'padding' + borr); 46 47 return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0); 45 48 }; 46 49 });