Plugin Directory

Changeset 606402


Ignore:
Timestamp:
10/01/2012 05:36:12 AM (13 years ago)
Author:
attosoft
Message:

Fixed a bug that Auto Resize does not work in iFeature theme, caused by img { height: auto; } style (regression by "Improved resizing algorithm" in [605631])

Location:
auto-thickbox-plus/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • auto-thickbox-plus/trunk/thickbox.js

    r606024 r606402  
    750750function tb_reposition(params) {
    751751    jQuery("#TB_window").width(jQuery(window).width()); // ThickBox windows height will be reset to appropriate value
     752    var isHeightAutoImg = jQuery("#TB_Image").height() == 0; // workaround for "img { height: auto; }" style
     753    if (isHeightAutoImg)
     754        jQuery("#TB_Image").height(imgPreloader.height);
    752755
    753756    var winBorderSize = tb_getSize(jQuery("#TB_window"), "border");
     
    778781
    779782    jQuery("#TB_Image").attr("width", imageWidth).attr("height", imageHeight);
    780 
    781     if (jQuery("#TB_Image").height() == 0) jQuery("#TB_Image").height(imageHeight); // workaround for "img { height: auto; }" style
     783    if (isHeightAutoImg)
     784        jQuery("#TB_Image").height(imageHeight);
     785
    782786    TB_WIDTH = imageWidth + (imgMarginSize[0] - imgSize[0]);
    783787    TB_HEIGHT = imageHeight + (winSize[1] - imgSize[1]);
Note: See TracChangeset for help on using the changeset viewer.