allow opacity to be set with OpenLayers.Util.modifyDOMElement(). added test.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1547 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-10-03 18:50:44 +00:00
parent 4f8c62df3f
commit 7280a6211e
2 changed files with 13 additions and 5 deletions

View File

@@ -14,9 +14,10 @@ OpenLayers.Util = new Object();
* @param {String} position
* @param {String} border
* @param {String} overflow
* @param {float} opacity Fractional value (0.0 - 1.0)
*/
OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
border, overflow) {
border, overflow, opacity) {
if (id) {
element.id = id;
@@ -38,6 +39,10 @@ OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
if (overflow) {
element.style.overflow = overflow;
}
if (opacity) {
element.style.opacity = opacity;
element.style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
}
};
/**