OpenLayers OpenLayers

Changeset 2094

Show
Ignore:
Timestamp:
12/22/06 14:31:32 (2 years ago)
Author:
euzuro
Message:

patch for #441 - resolving Rico namespace conflict

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/LayerSwitcher.js

    r1721 r2094  
    355355        this.div.appendChild(this.layersDiv); 
    356356 
    357         Rico.Corner.round(this.div, {corners: "tl bl", 
    358                                       bgColor: "transparent", 
    359                                       color: this.activeColor, 
    360                                       blend: false}); 
    361  
    362         Rico.Corner.changeOpacity(this.layersDiv, 0.75); 
     357        OpenLayers.Rico.Corner.round(this.div, {corners: "tl bl", 
     358                                        bgColor: "transparent", 
     359                                        color: this.activeColor, 
     360                                        blend: false}); 
     361 
     362        OpenLayers.Rico.Corner.changeOpacity(this.layersDiv, 0.75); 
    363363 
    364364        var imgLocation = OpenLayers.Util.getImagesLocation(); 
  • trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js

    r2090 r2094  
    9292            if (this.contentDiv != null) { 
    9393                this.div.style.background = "transparent"; 
    94                 Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); 
     94                OpenLayers.Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); 
    9595            } 
    9696        } 
     
    107107        if (this.div != null) { 
    108108            if (this.contentDiv != null) { 
    109             Rico.Corner.changeOpacity(this.contentDiv, this.opacity); 
     109            OpenLayers.Rico.Corner.changeOpacity(this.contentDiv, this.opacity); 
    110110            } 
    111111        } 
     
    138138 
    139139        if (firstTime) { 
    140             Rico.Corner.round(this.div, options); 
     140            OpenLayers.Rico.Corner.round(this.div, options); 
    141141        } else { 
    142             Rico.Corner.reRound(this.contentDiv, options); 
     142            OpenLayers.Rico.Corner.reRound(this.contentDiv, options); 
    143143            //set the popup color and opacity 
    144144            this.setBackgroundColor();  
  • trunk/openlayers/lib/Rico/Color.js

    r1646 r2094  
    1 Rico.Color = OpenLayers.Class.create(); 
    2  
    3 Rico.Color.prototype = { 
     1OpenLayers.Rico.Color = OpenLayers.Class.create(); 
     2 
     3OpenLayers.Rico.Color.prototype = { 
    44 
    55   initialize: function(red, green, blue) { 
     
    2626 
    2727      // convert back to RGB... 
    28       this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); 
     28      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); 
    2929   }, 
    3030 
     
    3535 
    3636      // convert back to RGB and set values... 
    37       this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); 
     37      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); 
    3838   }, 
    3939 
     
    4444 
    4545      // convert back to RGB and set values... 
    46       this.rgb = Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b ); 
     46      this.rgb = OpenLayers.Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b ); 
    4747   }, 
    4848 
    4949   darken: function(percent) { 
    5050      var hsb  = this.asHSB(); 
    51       this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0)); 
     51      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0)); 
    5252   }, 
    5353 
    5454   brighten: function(percent) { 
    5555      var hsb  = this.asHSB(); 
    56       this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.min(hsb.b + percent,1)); 
     56      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.min(hsb.b + percent,1)); 
    5757   }, 
    5858 
     
    8181 
    8282   asHSB: function() { 
    83       return Rico.Color.RGBtoHSB(this.rgb.r, this.rgb.g, this.rgb.b); 
     83      return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r, this.rgb.g, this.rgb.b); 
    8484   }, 
    8585 
     
    9090}; 
    9191 
    92 Rico.Color.createFromHex = function(hexCode) { 
     92OpenLayers.Rico.Color.createFromHex = function(hexCode) { 
    9393  if(hexCode.length==4) { 
    9494    var shortHexCode = hexCode;  
     
    102102   var green = hexCode.substring(2,4); 
    103103   var blue  = hexCode.substring(4,6); 
    104    return new Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) ); 
     104   return new OpenLayers.Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) ); 
    105105} 
    106106 
     
    109109 * an HTML element. 
    110110 */ 
    111 Rico.Color.createColorFromBackground = function(elem) { 
     111OpenLayers.Rico.Color.createColorFromBackground = function(elem) { 
    112112 
    113113   var actualColor = RicoUtil.getElementsComputedStyle($(elem), "backgroundColor", "background-color"); 
    114114 
    115115   if ( actualColor == "transparent" && elem.parentNode ) 
    116       return Rico.Color.createColorFromBackground(elem.parentNode); 
     116      return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode); 
    117117 
    118118   if ( actualColor == null ) 
    119       return new Rico.Color(255,255,255); 
     119      return new OpenLayers.Rico.Color(255,255,255); 
    120120 
    121121   if ( actualColor.indexOf("rgb(") == 0 ) { 
    122122      var colors = actualColor.substring(4, actualColor.length - 1 ); 
    123123      var colorArray = colors.split(","); 
    124       return new Rico.Color( parseInt( colorArray[0] ), 
     124      return new OpenLayers.Rico.Color( parseInt( colorArray[0] ), 
    125125                            parseInt( colorArray[1] ), 
    126126                            parseInt( colorArray[2] )  ); 
     
    128128   } 
    129129   else if ( actualColor.indexOf("#") == 0 ) { 
    130       return Rico.Color.createFromHex(actualColor); 
     130      return OpenLayers.Rico.Color.createFromHex(actualColor); 
    131131   } 
    132132   else 
    133       return new Rico.Color(255,255,255); 
    134 } 
    135  
    136 Rico.Color.HSBtoRGB = function(hue, saturation, brightness) { 
     133      return new OpenLayers.Rico.Color(255,255,255); 
     134} 
     135 
     136OpenLayers.Rico.Color.HSBtoRGB = function(hue, saturation, brightness) { 
    137137 
    138138   var red   = 0; 
     
    189189} 
    190190 
    191 Rico.Color.RGBtoHSB = function(r, g, b) { 
     191OpenLayers.Rico.Color.RGBtoHSB = function(r, g, b) { 
    192192 
    193193   var hue; 
  • trunk/openlayers/lib/Rico/Corner.js

    r1646 r2094  
    1515 
    1616 
    17 var Rico = new Object(); 
    18 Rico.Corner = { 
     17OpenLayers.Rico = new Object(); 
     18OpenLayers.Rico.Corner = { 
    1919 
    2020   round: function(e, options) {