OpenLayers OpenLayers

Changeset 840

Show
Ignore:
Timestamp:
06/30/06 11:41:40 (2 years ago)
Author:
sderle
Message:

Added an 'alpha' option to Layer.Grid by which Layers can have the PNG alpha hack enabled on a per-Layer basis.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Layer/Grid.js

    r820 r840  
    1919    // this is an array of rows, each row is an array of tiles 
    2020    grid: null, 
     21 
     22    // alpha: boolean 
     23    // asserts whether or not the layer's images have an alpha channel 
     24    alpha: false, 
    2125 
    2226    /** 
     
    162166                                                             tileoffsety - parseInt(this.map.layerContainerDiv.style.top)) 
    163167                                                            ); 
    164                 tile.draw((this.params.TRANSPARENT == 'true')); 
     168                tile.draw(this.alpha); 
    165169                row.append(tile); 
    166170      
  • trunk/openlayers/lib/OpenLayers/Layer/WMS.js

    r820 r840  
    7272 
    7373    /** 
    74     * addTile creates a tile, initializes it (via 'draw' in this case), and  
     74    * addTile creates a tile, initializes it, and  
    7575    * adds it to the layer div.  
    7676    * 
  • trunk/openlayers/lib/OpenLayers/Tile/Image.js

    r788 r840  
    3737    */ 
    3838    draw:function(transparent) { 
    39         if (false) { // don't actually use the alpha PNG hack right now 
    40                      // it has a fiercely bad effect on IE6's performance 
    41             // if (transparent) { 
     39        if (transparent) { 
    4240            this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null, 
    4341                                                           this.position,