Changeset 2094
- Timestamp:
- 12/22/06 14:31:32 (2 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Control/LayerSwitcher.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js (modified) (3 diffs)
- trunk/openlayers/lib/Rico/Color.js (modified) (10 diffs)
- trunk/openlayers/lib/Rico/Corner.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Control/LayerSwitcher.js
r1721 r2094 355 355 this.div.appendChild(this.layersDiv); 356 356 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); 363 363 364 364 var imgLocation = OpenLayers.Util.getImagesLocation(); trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js
r2090 r2094 92 92 if (this.contentDiv != null) { 93 93 this.div.style.background = "transparent"; 94 Rico.Corner.changeColor(this.contentDiv, this.backgroundColor);94 OpenLayers.Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); 95 95 } 96 96 } … … 107 107 if (this.div != null) { 108 108 if (this.contentDiv != null) { 109 Rico.Corner.changeOpacity(this.contentDiv, this.opacity);109 OpenLayers.Rico.Corner.changeOpacity(this.contentDiv, this.opacity); 110 110 } 111 111 } … … 138 138 139 139 if (firstTime) { 140 Rico.Corner.round(this.div, options);140 OpenLayers.Rico.Corner.round(this.div, options); 141 141 } else { 142 Rico.Corner.reRound(this.contentDiv, options);142 OpenLayers.Rico.Corner.reRound(this.contentDiv, options); 143 143 //set the popup color and opacity 144 144 this.setBackgroundColor(); trunk/openlayers/lib/Rico/Color.js
r1646 r2094 1 Rico.Color = OpenLayers.Class.create();2 3 Rico.Color.prototype = {1 OpenLayers.Rico.Color = OpenLayers.Class.create(); 2 3 OpenLayers.Rico.Color.prototype = { 4 4 5 5 initialize: function(red, green, blue) { … … 26 26 27 27 // 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); 29 29 }, 30 30 … … 35 35 36 36 // 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); 38 38 }, 39 39 … … 44 44 45 45 // 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 ); 47 47 }, 48 48 49 49 darken: function(percent) { 50 50 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)); 52 52 }, 53 53 54 54 brighten: function(percent) { 55 55 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)); 57 57 }, 58 58 … … 81 81 82 82 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); 84 84 }, 85 85 … … 90 90 }; 91 91 92 Rico.Color.createFromHex = function(hexCode) {92 OpenLayers.Rico.Color.createFromHex = function(hexCode) { 93 93 if(hexCode.length==4) { 94 94 var shortHexCode = hexCode; … … 102 102 var green = hexCode.substring(2,4); 103 103 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) ); 105 105 } 106 106 … … 109 109 * an HTML element. 110 110 */ 111 Rico.Color.createColorFromBackground = function(elem) {111 OpenLayers.Rico.Color.createColorFromBackground = function(elem) { 112 112 113 113 var actualColor = RicoUtil.getElementsComputedStyle($(elem), "backgroundColor", "background-color"); 114 114 115 115 if ( actualColor == "transparent" && elem.parentNode ) 116 return Rico.Color.createColorFromBackground(elem.parentNode);116 return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode); 117 117 118 118 if ( actualColor == null ) 119 return new Rico.Color(255,255,255);119 return new OpenLayers.Rico.Color(255,255,255); 120 120 121 121 if ( actualColor.indexOf("rgb(") == 0 ) { 122 122 var colors = actualColor.substring(4, actualColor.length - 1 ); 123 123 var colorArray = colors.split(","); 124 return new Rico.Color( parseInt( colorArray[0] ),124 return new OpenLayers.Rico.Color( parseInt( colorArray[0] ), 125 125 parseInt( colorArray[1] ), 126 126 parseInt( colorArray[2] ) ); … … 128 128 } 129 129 else if ( actualColor.indexOf("#") == 0 ) { 130 return Rico.Color.createFromHex(actualColor);130 return OpenLayers.Rico.Color.createFromHex(actualColor); 131 131 } 132 132 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 136 OpenLayers.Rico.Color.HSBtoRGB = function(hue, saturation, brightness) { 137 137 138 138 var red = 0; … … 189 189 } 190 190 191 Rico.Color.RGBtoHSB = function(r, g, b) {191 OpenLayers.Rico.Color.RGBtoHSB = function(r, g, b) { 192 192 193 193 var hue; trunk/openlayers/lib/Rico/Corner.js
r1646 r2094 15 15 16 16 17 varRico = new Object();18 Rico.Corner = {17 OpenLayers.Rico = new Object(); 18 OpenLayers.Rico.Corner = { 19 19 20 20 round: function(e, options) {
