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:
@@ -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) + ')';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user