Only set img.style.position once
This commit is contained in:
@@ -228,6 +228,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
|||||||
this.imgDiv = document.createElement("img");
|
this.imgDiv = document.createElement("img");
|
||||||
|
|
||||||
this.imgDiv.className = "olTileImage";
|
this.imgDiv.className = "olTileImage";
|
||||||
|
this.imgDiv.style.position = "absolute";
|
||||||
// avoid image gallery menu in IE6
|
// avoid image gallery menu in IE6
|
||||||
this.imgDiv.galleryImg = "no";
|
this.imgDiv.galleryImg = "no";
|
||||||
|
|
||||||
@@ -239,13 +240,11 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
|||||||
style.top = -top + "%";
|
style.top = -top + "%";
|
||||||
style.width = (2 * left + 100) + "%";
|
style.width = (2 * left + 100) + "%";
|
||||||
style.height = (2 * top + 100) + "%";
|
style.height = (2 * top + 100) + "%";
|
||||||
style.position = "absolute";
|
|
||||||
} else {
|
} else {
|
||||||
style.width = "100%";
|
style.width = "100%";
|
||||||
style.height = "100%";
|
style.height = "100%";
|
||||||
}
|
}
|
||||||
style.display = "none";
|
style.display = "none";
|
||||||
style.position = "absolute";
|
|
||||||
if (this.layer.opacity < 1) {
|
if (this.layer.opacity < 1) {
|
||||||
OpenLayers.Util.modifyDOMElement(this.imgDiv, null, null,
|
OpenLayers.Util.modifyDOMElement(this.imgDiv, null, null,
|
||||||
null, null, null, null,
|
null, null, null, null,
|
||||||
|
|||||||
Reference in New Issue
Block a user