X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsymbols%2Fsrc%2FRoo_bootstrap_Tooltip.js.html;h=0b6811782bcef6d020202565eaedd50392cace9c;hb=b1d19ca25e05783a1bf10a2662408a4c8ac2dde4;hp=eddb22c42d109e2510cecbe745b4564136e6e1b4;hpb=e13cc0e884c0a0c67934a5da91833f82cd02c90b;p=roojs1
diff --git a/docs/symbols/src/Roo_bootstrap_Tooltip.js.html b/docs/symbols/src/Roo_bootstrap_Tooltip.js.html
index eddb22c42d..0b6811782b 100644
--- a/docs/symbols/src/Roo_bootstrap_Tooltip.js.html
+++ b/docs/symbols/src/Roo_bootstrap_Tooltip.js.html
@@ -233,9 +233,8 @@
//this.el.setXY([0,0]);
this.el.show();
this.el.addClass(placement);
- var p = this.getPosition();
var box = this.el.getBox();
@@ -243,12 +242,31 @@
if (autoPlace) {
}
+
var align = Roo.bootstrap.Tooltip.alignment[placement];
+
+ var xy = this.el.getAlignToXY(this.bindEl, align[0], align[1]);
+
+ 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];
+
this.el.alignTo(this.bindEl, align[0],align[1]);
this.el.addClass(placement);
+
this.el.addClass('in fade');
+
this.hoverState = null;
if (this.el.hasClass('fade')) {