--- a/web/lib/metadataplayer/Tooltip.js Wed Nov 06 19:21:12 2013 +0100
+++ b/web/lib/metadataplayer/Tooltip.js Thu Nov 07 13:35:41 2013 +0100
@@ -41,7 +41,21 @@
IriSP.Widgets.Tooltip.prototype.show = function(x, y, text, color) {
if (typeof color !== "undefined") {
- this.$.find(".Ldt-Tooltip-Color").show().css("background-color", color);
+ // one color or array of colors
+ if (typeof color === "string") {
+ this.$.find(".Ldt-Tooltip-Color").html("");
+ this.$.find(".Ldt-Tooltip-Color").show().css("background-color", color);
+ this.$.find(".Ldt-Tooltip-Color").show().css("height", "");
+ }
+ else{
+ var d = this.$.find(".Ldt-Tooltip-Color");
+ d.html("");
+ d.show();
+ for(var i=0; i<color.length; i++){
+ d.append('<div style="float: left; height: 10px; width: 10px; background-color: ' + color[i] + '">')
+ }
+ this.$.find(".Ldt-Tooltip-Color").css("height", (color.length * 10) + "px");
+ }
} else {
this.$.find(".Ldt-Tooltip-Color").hide();
}