Merge pull request #432 from ahocevar/iframe-opacity
Long URLs messing up Opacity. r=@elemoine,@lewinmadrid
This commit is contained in:
@@ -1287,6 +1287,11 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
var childNodes = this.div.childNodes;
|
var childNodes = this.div.childNodes;
|
||||||
for(var i = 0, len = childNodes.length; i < len; ++i) {
|
for(var i = 0, len = childNodes.length; i < len; ++i) {
|
||||||
var element = childNodes[i].firstChild || childNodes[i];
|
var element = childNodes[i].firstChild || childNodes[i];
|
||||||
|
var lastChild = childNodes[i].lastChild;
|
||||||
|
//TODO de-uglify this
|
||||||
|
if (lastChild && lastChild.nodeName.toLowerCase() === "iframe") {
|
||||||
|
element = lastChild.parentNode;
|
||||||
|
}
|
||||||
OpenLayers.Util.modifyDOMElement(element, null, null, null,
|
OpenLayers.Util.modifyDOMElement(element, null, null, null,
|
||||||
null, null, null, opacity);
|
null, null, null, opacity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,6 +196,19 @@ OpenLayers.Tile.Image.IFrame = {
|
|||||||
OpenLayers.Tile.Image.prototype.setImgSrc.apply(this, arguments);
|
OpenLayers.Tile.Image.prototype.setImgSrc.apply(this, arguments);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: onImageLoad
|
||||||
|
* Handler for the image onload event
|
||||||
|
*/
|
||||||
|
onImageLoad: function() {
|
||||||
|
//TODO de-uglify opacity handling
|
||||||
|
OpenLayers.Tile.Image.prototype.onImageLoad.apply(this, arguments);
|
||||||
|
if (this.useIFrame === true) {
|
||||||
|
this.imgDiv.style.opacity = 1;
|
||||||
|
this.frame.style.opacity = this.layer.opacity;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: createBackBuffer
|
* Method: createBackBuffer
|
||||||
|
|||||||
Reference in New Issue
Block a user