src/widgets/Tooltip.js
branchnew-model
changeset 882 61c384dda19e
parent 875 43629caa77bc
child 922 096c06aea8b5
equal deleted inserted replaced
881:f11b234497f7 882:61c384dda19e
    25     if (typeof color !== "undefined") {
    25     if (typeof color !== "undefined") {
    26         this.$.find(".Ldt-Tooltip-Color").show().css("background-color", color);
    26         this.$.find(".Ldt-Tooltip-Color").show().css("background-color", color);
    27     } else {
    27     } else {
    28         this.$.find(".Ldt-Tooltip-Color").hide();
    28         this.$.find(".Ldt-Tooltip-Color").hide();
    29     }
    29     }
    30     
    30 
    31     this.$.find(".Ldt-Tooltip-Text").html(text);
    31     this.$.find(".Ldt-Tooltip-Text").html(text);
    32 
    32 
    33     this.$tip.show();
    33     this.$tip.show();
    34     this.$tip.css({
    34     this.$tip.css({
    35         "left" : Math.floor(x - this.$tip.outerWidth() / 2) + "px",
    35         "left" : Math.floor(x - this.$tip.outerWidth() / 2) + "px",
    36         "top" : Math.floor(y - this.$tip.outerHeight() - 5) + "px"
    36         "top" : Math.floor(y - this.$tip.outerHeight()) + "px"
    37     });
    37     });
    38 };
    38 };
    39 
    39 
    40 IriSP.Widgets.Tooltip.prototype.hide = function() {
    40 IriSP.Widgets.Tooltip.prototype.hide = function() {
    41     this.$tip.hide();
    41     this.$tip.hide();