From ec397fa9cff9e706c18304461ffd9c096720479f Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 25 May 2006 01:11:42 +0000 Subject: [PATCH] change algorithms so that corners' changeOpacity function takes as input a float value between 1 and 0, instead of between 1 and 10. Might as well subscribe to *somebody's* standard and adapt to the other, rathere than something in between. plus, this is how Popup.js was designed. git-svn-id: http://svn.openlayers.org/trunk/openlayers@345 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/Rico/Corner.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Rico/Corner.js b/lib/Rico/Corner.js index 71289f115c..b3a2970a13 100644 --- a/lib/Rico/Corner.js +++ b/lib/Rico/Corner.js @@ -61,15 +61,15 @@ Rico.Corner = { * * See changeColor (above) for algorithm explanation * - * @param {DOM} theDiv - A child of the outer
that was + * @param {DOM} theDiv A child of the outer
that was * supplied to the `round` method. * - * @param {int} newOpacity - The new opacity to use (1-10). + * @param {int} newOpacity The new opacity to use (0-1). */ changeOpacity: function(theDiv, newOpacity) { - var mozillaOpacity = newOpacity / 10 - var ieOpacity = 'alpha(opacity=' + newOpacity * 10 + ')'; + var mozillaOpacity = newOpacity; + var ieOpacity = 'alpha(opacity=' + newOpacity * 100 + ')'; theDiv.style.opacity = mozillaOpacity; theDiv.style.filter = ieOpacity;