limit where the widget can position itself. popcorn-port
authorhamidouk
Tue, 17 Jan 2012 14:48:10 +0100
branchpopcorn-port
changeset 646 2b8b2a94ee92
parent 645 0c8ca890c9f1
child 647 2984fbbcbe35
limit where the widget can position itself.
src/js/widgets/tooltipWidget.js
--- a/src/js/widgets/tooltipWidget.js	Tue Jan 17 11:00:33 2012 +0100
+++ b/src/js/widgets/tooltipWidget.js	Tue Jan 17 14:48:10 2012 +0100
@@ -30,7 +30,12 @@
   this.selector.find(".tipcolor").css("background-color", color);
   this._displayedText = text;
 	this.selector.find(".tiptext").text(text);
-  //this.selector.find(".tip").css("left", x).css("top", y);  
+  
+  if (x < 0)
+    x = 0;
+  if (y < 0)
+    y = 0;
+  
   this.selector.find(".tip").css("left", x).css("top", y);
   this.selector.find(".tip").show();
   this._shown = true;