Create a function -- OpenLayers.Util.getElement -- which replaces "$". This
should be used in all library code. This patch replaces all uses of "$()" in existing code. The primary reason for this is to avoid conflicts with libraries (like Prototype) which might redefine this function differently. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2541 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -110,7 +110,10 @@ shortHexCode.charAt(i));
|
||||
*/
|
||||
OpenLayers.Rico.Color.createColorFromBackground = function(elem) {
|
||||
|
||||
var actualColor = RicoUtil.getElementsComputedStyle($(elem), "backgroundColor", "background-color");
|
||||
var actualColor =
|
||||
RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem),
|
||||
"backgroundColor",
|
||||
"background-color");
|
||||
|
||||
if ( actualColor == "transparent" && elem.parentNode )
|
||||
return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);
|
||||
|
||||
@@ -18,7 +18,7 @@ OpenLayers.Rico = new Object();
|
||||
OpenLayers.Rico.Corner = {
|
||||
|
||||
round: function(e, options) {
|
||||
var e = $(e);
|
||||
e = OpenLayers.Util.getElement(e);
|
||||
this._setOptions(options);
|
||||
|
||||
var color = this.options.color;
|
||||
|
||||
Reference in New Issue
Block a user