OpenLayers OpenLayers

Changeset 6670

Show
Ignore:
Timestamp:
03/28/08 18:14:13 (10 months ago)
Author:
euzuro
Message:

why should we let such a silly thing as ie6 stand in the way of great glory and fame? this is a question best asked of a man named tim schaub. behind the veneer of a antler headed lakesman, that guy knows a thing or two about browsers. And images too. who knew? Instead of futzing with the unpleasant alpha image business, he has redone our cranky popup image to be a normal png (maybe 'normal' isnt the word, but whatever it is, he changed it) and now we don't have to use the alpha bits. If we eventually wish to use an image with a nice shadow then we *will* have to do use the alpha, so we will give the framed popup an 'isAlphaImage' property to allow folks to do things the hard way. What does all this mean? it means that opening these popups in ie6 no longer causes 20mb memory surges for each one. I say job well done.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/pop/lib/OpenLayers/Popup/Framed.js

    r6658 r6670  
    2929    imageSize: null, 
    3030 
     31    /** 
     32     * APIProperty: isAlphaImage 
     33     * {Boolean} The image has some alpha and thus needs to use the alpha  
     34     *     image hack. Note that setting this to true will have no noticeable 
     35     *     effect in FF or IE7 browsers, but will all but crush the ie6  
     36     *     browser.  
     37     *     Default is false. 
     38     */ 
     39    isAlphaImage: false, 
     40     
    3141    /** 
    3242     * Property: positionBlocks 
     
    276286 
    277287            var imgId = this.id + '_FrameDecorationImg_' + i; 
    278             fBlock.image = OpenLayers.Util.createAlphaImageDiv(imgId,  
     288            var imageCreator =  
     289                (this.isAlphaImage) ? OpenLayers.Util.createAlphaImageDiv 
     290                                    : OpenLayers.Util.createImage; 
     291                 
     292            fBlock.image = imageCreator(imgId,  
    279293                null, this.imageSize, this.imageSrc,  
    280294                "absolute", null, null, null 
  • sandbox/euzuro/pop/lib/OpenLayers/Popup/FramedCloud.js

    r6657 r6670  
    4646     */ 
    4747    fixedRelativePosition: false, 
     48     
     49    /** 
     50     * APIProperty: isAlphaImage 
     51     * {Boolean} The FramedCloud does not use an alpha image (in honor of the  
     52     *     good ie6 folk out there) 
     53     */ 
     54    isAlphaImage: false, 
    4855     
    4956    /**