replace useage of OpenLayers.Util.setOpacity() with OpenLayers.Util.modifyDOMElement(). Rewrite the former to use the latter, and mark the former as deprecated.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1551 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-10-03 19:38:15 +00:00
parent 7fa0910fcf
commit 25da469210
3 changed files with 11 additions and 4 deletions

View File

@@ -134,6 +134,9 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
};
/**
* @deprecated -- Use OpenLayers.Util.modifyDOMElement() or
* OpenLayers.Util.modifyAlphaImageDiv()
*
* Set the opacity of a DOM Element
* Note that for this function to work in IE, elements must "have layout"
* according to:
@@ -143,8 +146,8 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
* @param {Float} opacity Opacity value (0.0 - 1.0)
*/
OpenLayers.Util.setOpacity = function(element, opacity) {
element.style.opacity = opacity;
element.style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
OpenLayers.Util.modifyDOMElement(element, null, null, null,
null, null, null, opacity);
}
OpenLayers.Util.onImageLoad = function() {