Permalink
Browse files

Fallback to fixed width values if aspect ratio is specified and width…

… is not (or auto)
  • Loading branch information...
1 parent 499216e commit a415a9217db0ecb2eaeed7b49b23461ec45710f8 Thad Cox committed Jun 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 foresight.js
View
@@ -501,7 +501,7 @@
computedWidthValue = getComputedStyleValue( img, DIMENSION_WIDTH );
img.style[ STYLE_ATTRIBUTE_DISPLAY ] = oldDisplay;
- if ( computedWidthValue === 'auto' || computedWidthValue.indexOf( '%' ) > 0 ) {
+ if ( ( img[ ASPECT_RATIO] && computedWidthValue === 'auto' ) || computedWidthValue.indexOf( '%' ) > 0 ) {
// if the width has a percent value then change the display to
// display:block to help get correct browser pixel width
img.unitType = UNIT_TYPE_PERCENT;

0 comments on commit a415a92

Please sign in to comment.