src/widgets/Tooltip.js
changeset 987 7b65bf78873a
parent 986 f9d51dd4a3fe
child 1021 7253d4d06f0d
--- a/src/widgets/Tooltip.js	Wed Dec 19 19:02:52 2012 +0100
+++ b/src/widgets/Tooltip.js	Thu Jan 17 17:25:46 2013 +0100
@@ -56,8 +56,8 @@
         shift = Math.max(x - this.__halfWidth - this.min_x, - this.__maxShift);
     }
     
-    if (typeof this.max_x !== "undefined" && (x + this.__halfWidth > this.max_x)) {
-        shift = Math.min(x + this.__halfWidth - this.max_x, this.__maxShift);
+    if (typeof this.max_x !== "undefined" && (+x + this.__halfWidth > this.max_x)) {
+        shift = Math.min(+ x + this.__halfWidth - this.max_x, this.__maxShift);
     }
     
     this.$tooltip.css({