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
This commit is contained in:
+4
-4
@@ -61,15 +61,15 @@ Rico.Corner = {
|
|||||||
*
|
*
|
||||||
* See changeColor (above) for algorithm explanation
|
* See changeColor (above) for algorithm explanation
|
||||||
*
|
*
|
||||||
* @param {DOM} theDiv - A child of the outer <div> that was
|
* @param {DOM} theDiv A child of the outer <div> that was
|
||||||
* supplied to the `round` method.
|
* 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) {
|
changeOpacity: function(theDiv, newOpacity) {
|
||||||
|
|
||||||
var mozillaOpacity = newOpacity / 10
|
var mozillaOpacity = newOpacity;
|
||||||
var ieOpacity = 'alpha(opacity=' + newOpacity * 10 + ')';
|
var ieOpacity = 'alpha(opacity=' + newOpacity * 100 + ')';
|
||||||
|
|
||||||
theDiv.style.opacity = mozillaOpacity;
|
theDiv.style.opacity = mozillaOpacity;
|
||||||
theDiv.style.filter = ieOpacity;
|
theDiv.style.filter = ieOpacity;
|
||||||
|
|||||||
Reference in New Issue
Block a user