migrate out alphaHack checking into OpenLayers.Util.alphaHack().
git-svn-id: http://svn.openlayers.org/trunk/openlayers@382 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -670,6 +670,14 @@ OpenLayers.Util.createImage = function(img, sz, xy, position, id, border) {
|
|||||||
return image;
|
return image;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
OpenLayers.Util.alphaHack = function() {
|
||||||
|
var arVersion = navigator.appVersion.split("MSIE");
|
||||||
|
var version = parseFloat(arVersion[1]);
|
||||||
|
|
||||||
|
var alphaHack = ( (document.body.filters) &&
|
||||||
|
(version >= 5.5) && (version < 7) );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} imgURL
|
* @param {String} imgURL
|
||||||
* @param {OpenLayers.Size} sz
|
* @param {OpenLayers.Size} sz
|
||||||
@@ -690,14 +698,7 @@ OpenLayers.Util.createAlphaImageDiv = function(imgURL, sz, px, position,
|
|||||||
id + "_innerImage", border);
|
id + "_innerImage", border);
|
||||||
div.appendChild(img);
|
div.appendChild(img);
|
||||||
|
|
||||||
|
if (OpenLayers.Util.alphaHack()) {
|
||||||
var arVersion = navigator.appVersion.split("MSIE");
|
|
||||||
var version = parseFloat(arVersion[1]);
|
|
||||||
|
|
||||||
var alphaHack = ( (document.body.filters) &&
|
|
||||||
(version >= 5.5) && (version < 7) );
|
|
||||||
|
|
||||||
if (alphaHack) {
|
|
||||||
div.style.display = "inline-block";
|
div.style.display = "inline-block";
|
||||||
div.style.filter = "progid:DXImageTransform.Microsoft" +
|
div.style.filter = "progid:DXImageTransform.Microsoft" +
|
||||||
".AlphaImageLoader(src='" + imgURL + "')";
|
".AlphaImageLoader(src='" + imgURL + "')";
|
||||||
|
|||||||
Reference in New Issue
Block a user