Fix for "Util.modifyAlphaImageDiv makes hidden elements reappear in IE6.".
Patch by jwpage. (Closes #1520) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7299 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -427,8 +427,9 @@ OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
|
||||
"relative", border);
|
||||
|
||||
if (OpenLayers.Util.alphaHack()) {
|
||||
|
||||
div.style.display = "inline-block";
|
||||
if(div.style.display != "none") {
|
||||
div.style.display = "inline-block";
|
||||
}
|
||||
if (sizing == null) {
|
||||
sizing = "scale";
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
}
|
||||
|
||||
function test_Util_modifyAlphaImageDiv(t) {
|
||||
t.plan( 19 );
|
||||
t.plan( 20 );
|
||||
|
||||
var imageDiv = OpenLayers.Util.createAlphaImageDiv();
|
||||
|
||||
@@ -460,8 +460,6 @@
|
||||
|
||||
if (OpenLayers.Util.alphaHack()) {
|
||||
|
||||
t.eq(imageDiv.style.display, "inline-block", "imageDiv.style.display set correctly");
|
||||
|
||||
var filter = "progid:DXImageTransform.Microsoft" +
|
||||
".AlphaImageLoader(src='" + img + "', " +
|
||||
"sizingMethod='" + sizing + "') alpha(opacity=" + opacity *100 + ")";
|
||||
@@ -476,6 +474,20 @@
|
||||
t.ok(true, "image filter value not set (not in IE)");
|
||||
}
|
||||
|
||||
var imageDiv = OpenLayers.Util.createAlphaImageDiv();
|
||||
var display = "none";
|
||||
imageDiv.style.display = display;
|
||||
OpenLayers.Util.modifyAlphaImageDiv(imageDiv, id, xy, sz, img, position, border, sizing, opacity);
|
||||
t.eq(imageDiv.style.display, display, "imageDiv.style.display set correctly, if 'none'");
|
||||
|
||||
var imageDiv = OpenLayers.Util.createAlphaImageDiv();
|
||||
var display = "block";
|
||||
imageDiv.style.display = display;
|
||||
OpenLayers.Util.modifyAlphaImageDiv(imageDiv, id, xy, sz, img, position, border, sizing, opacity);
|
||||
t.eq(imageDiv.style.display, "inline-block", "imageDiv.style.display set correctly, if not 'none'");
|
||||
|
||||
|
||||
|
||||
var imageDiv = OpenLayers.Util.createAlphaImageDiv(id, xy, sz, img, position, border, "scale", opacity);
|
||||
if (OpenLayers.Util.alphaHack()) {
|
||||
var filter = "progid:DXImageTransform.Microsoft" +
|
||||
|
||||
Reference in New Issue
Block a user