fix for #77. alpha png transparency. and tests. yay.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@605 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-15 19:02:21 +00:00
parent 18d178d7d2
commit 836b47c192
3 changed files with 32 additions and 20 deletions

View File

@@ -7,7 +7,7 @@ OpenLayers.Tile.Image.prototype =
Object.extend( new OpenLayers.Tile(), {
/** @type DOMElement img */
img:null,
imgDiv:null,
/**
* @constructor
@@ -23,22 +23,22 @@ OpenLayers.Tile.Image.prototype =
},
destroy: function() {
if ((this.img != null) && (this.img.parentNode == this.layer.div)) {
this.layer.div.removeChild(this.img);
if ((this.imgDiv != null) && (this.imgDiv.parentNode == this.layer.div)) {
this.layer.div.removeChild(this.imgDiv);
}
this.img = null;
this.imgDiv = null;
OpenLayers.Tile.prototype.destroy.apply(this, arguments);
},
/**
*/
draw:function() {
this.img = OpenLayers.Util.createImage(null,
this.position,
this.size,
this.url,
"absolute");
this.layer.div.appendChild(this.img);
this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
this.position,
this.size,
this.url,
"absolute");
this.layer.div.appendChild(this.imgDiv);
},
/** @final @type String */