element used to obtain color data. When
* getting color data the class and data-name attribute of this element are
* changed.
*/
_getElement: function () {
if (!this.$element) {
$('body').append('
');
this.$element = $('#color-manager');
}
return this.$element;
},
/**
* Returns this browser's representation of the 'transparent' color. Used to
* compare against colors obtained in getColor. If a color is 'transparent'
* it means there's no color for that namespace/name combination.
*/
_getTransparentColor: function () {
if (!this.transparentColor) {
this.transparentColor =
$('
').appendTo($('body')).css('color');
}
return this.transparentColor;
}
};
piwik.ColorManager = new ColorManager();
}(jQuery));