Fix a bug in Rico Color introduced by our original porting by switching to
use our internal OpenLayers function instead of an external function; found by jorix in his closure work. r=bartvde, (Closes #2976) git-svn-id: http://svn.openlayers.org/trunk/openlayers@11646 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+3
-3
@@ -1,5 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @requires OpenLayers/BaseTypes/Class.js
|
* @requires OpenLayers/BaseTypes/Class.js
|
||||||
|
* @requires OpenLayers/BaseTypes/Element.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -124,9 +125,8 @@ shortHexCode.charAt(i));
|
|||||||
OpenLayers.Rico.Color.createColorFromBackground = function(elem) {
|
OpenLayers.Rico.Color.createColorFromBackground = function(elem) {
|
||||||
|
|
||||||
var actualColor =
|
var actualColor =
|
||||||
RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem),
|
OpenLayers.Element.getStyle(OpenLayers.Util.getElement(elem),
|
||||||
"backgroundColor",
|
"backgroundColor");
|
||||||
"background-color");
|
|
||||||
|
|
||||||
if ( actualColor == "transparent" && elem.parentNode ) {
|
if ( actualColor == "transparent" && elem.parentNode ) {
|
||||||
return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);
|
return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user