Roo/bootstrap/Tooltip.js
authoredward <edward@roojs.com>
Thu, 25 Feb 2016 06:52:26 +0000 (14:52 +0800)
committeredward <edward@roojs.com>
Thu, 25 Feb 2016 06:52:26 +0000 (14:52 +0800)
Roo/bootstrap/Tooltip.js

index cc95aab..29acf25 100644 (file)
@@ -247,15 +247,13 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component,  {
         
         var xy = this.el.getAlignToXY(this.bindEl, align[0], align[1]);
         
-        Roo.log(xy);
-        Roo.log(this.el.getWidth());
         if(placement == 'top' || placement == 'bottom'){
             if(xy[0] < 0){
                 placement = 'right';
             }
             
-            if(xy[0] < 0){
-                placement = 'right';
+            if(xy[0] + this.el.getWidth() > Roo.lib.Dom.getViewWidth()){
+                placement = 'left';
             }
         }