Plugin Directory

Changeset 612443


Ignore:
Timestamp:
10/14/2012 10:38:59 PM (13 years ago)
Author:
codeblab
Message:

Added a MSIE dependency. No fun.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • glass/trunk/glass.js

    r612358 r612443  
    573573        my.bboxLeft   = absoluteX;
    574574        my.bboxTop    = absoluteY;
    575         my.bboxRight  = imageX + clientWidth;
    576         my.bboxBottom = imageY + clientHeight;
    577 
    578         my.lowres.trueWidth  =  clientWidth - paddingLeft - paddingRight;
    579         my.lowres.trueHeight =  clientHeight - paddingTop - paddingBottom;
    580 
     575        if (navigator.userAgent.search(/msie/i) > 0) {
     576          // IE goes against the standard.
     577          my.bboxRight  = imageX + clientWidth + paddingLeft + paddingRight;
     578          my.bboxBottom = imageY + clientHeight + paddingTop + paddingBottom;
     579          my.lowres.trueWidth  =  clientWidth;
     580          my.lowres.trueHeight =  clientHeight;
     581        } else {
     582          // Standard way is to inlcude the padding in clientWidth/Height.
     583          my.bboxRight  = imageX + clientWidth;
     584          my.bboxBottom = imageY + clientHeight;
     585          my.lowres.trueWidth  =  clientWidth - paddingLeft - paddingRight;
     586          my.lowres.trueHeight =  clientHeight - paddingTop - paddingBottom;
     587        }
    581588      }
    582589      // Flag refresh to calculate the scale, wipe the background.
     
    11111118    for (var s in gGlassRimSizeArray)
    11121119      glassCreateDummyImage(gGlassRimPath + 'spy' + gGlassRimSizeArray[s]
    1113                 + '.png');
     1120                            + '.png');
    11141121  }
    11151122  else { // Preload all the rims.
     
    11891196  }
    11901197}
    1191 
Note: See TracChangeset for help on using the changeset viewer.