src/js/widgets/tooltipWidget.js
branchpopcorn-port
changeset 177 69b14f35e900
parent 172 3ffa0e0c8803
child 231 accc7358d8b5
equal deleted inserted replaced
176:c04283d7d1ef 177:69b14f35e900
    12   this.hide();
    12   this.hide();
    13   
    13   
    14 };
    14 };
    15 
    15 
    16 IriSP.TooltipWidget.prototype.show = function(text, color, x, y) {
    16 IriSP.TooltipWidget.prototype.show = function(text, color, x, y) {
    17   this.selector.children(".tipcolor").css("background-color", color);
    17   if (this.selector.find(".tiptext").text() == text)
    18 	this.selector.find(".tiptext").text(text);
    18     return;
    19   this.selector.children(".tip").css("left", x).css("top", y);
    19     
       
    20   this.selector.find(".tipcolor").css("background-color", color);  
       
    21 	this.selector.find(".tiptext").text(text);  
       
    22   this.selector.find(".tip").css("left", x).css("top", y);
    20 };
    23 };
    21 
    24 
    22 IriSP.TooltipWidget.prototype.hide = function() {
    25 IriSP.TooltipWidget.prototype.hide = function() {
    23   this.selector.children(".tip").css("left", -10000).css("top", -100000);
    26   this.selector.find(".tip").css("left", -10000).css("top", -100000);
    24 };
    27 };