src/widgets/Tooltip.js
changeset 987 7b65bf78873a
parent 986 f9d51dd4a3fe
child 1021 7253d4d06f0d
equal deleted inserted replaced
986:f9d51dd4a3fe 987:7b65bf78873a
    54     
    54     
    55     if (typeof this.min_x !== "undefined" && (x - this.__halfWidth < this.min_x)) {
    55     if (typeof this.min_x !== "undefined" && (x - this.__halfWidth < this.min_x)) {
    56         shift = Math.max(x - this.__halfWidth - this.min_x, - this.__maxShift);
    56         shift = Math.max(x - this.__halfWidth - this.min_x, - this.__maxShift);
    57     }
    57     }
    58     
    58     
    59     if (typeof this.max_x !== "undefined" && (x + this.__halfWidth > this.max_x)) {
    59     if (typeof this.max_x !== "undefined" && (+x + this.__halfWidth > this.max_x)) {
    60         shift = Math.min(x + this.__halfWidth - this.max_x, this.__maxShift);
    60         shift = Math.min(+ x + this.__halfWidth - this.max_x, this.__maxShift);
    61     }
    61     }
    62     
    62     
    63     this.$tooltip.css({
    63     this.$tooltip.css({
    64         "left" : (x - shift) + "px",
    64         "left" : (x - shift) + "px",
    65         "top" : y + "px"
    65         "top" : y + "px"