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;
|
||||
};
|
||||
|
||||
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 {OpenLayers.Size} sz
|
||||
@@ -690,14 +698,7 @@ OpenLayers.Util.createAlphaImageDiv = function(imgURL, sz, px, position,
|
||||
id + "_innerImage", border);
|
||||
div.appendChild(img);
|
||||
|
||||
|
||||
var arVersion = navigator.appVersion.split("MSIE");
|
||||
var version = parseFloat(arVersion[1]);
|
||||
|
||||
var alphaHack = ( (document.body.filters) &&
|
||||
(version >= 5.5) && (version < 7) );
|
||||
|
||||
if (alphaHack) {
|
||||
if (OpenLayers.Util.alphaHack()) {
|
||||
div.style.display = "inline-block";
|
||||
div.style.filter = "progid:DXImageTransform.Microsoft" +
|
||||
".AlphaImageLoader(src='" + imgURL + "')";
|
||||
|
||||
Reference in New Issue
Block a user