Roo.log(xy);
- if(xy[0] < 0){
- placement = 'right';
- }
-
- if(xy[0] + this.el.getWidth() > Roo.lib.Dom.getViewWidth()){
- placement = 'left';
+ if(placement == 'top' || placement == 'bottom'){
+ if(xy[0] < 0){
+ placement = 'right';
+ }
+
+ if(xy[0] + this.el.getWidth() > Roo.lib.Dom.getViewWidth()){
+ placement = 'left';
+ }
}
-
-// if(placement == 'top' || placement == 'bottom'){
-// if(xy[0] < 0){
-// placement = 'right';
-// }
-//
-// if(xy[0] + this.el.getWidth() > Roo.lib.Dom.getViewWidth()){
-// placement = 'left';
-// }
-// }
align = Roo.bootstrap.Tooltip.alignment[placement];