Roo/bootstrap/Tooltip.js
authorjohn <john@roojs.com>
Fri, 21 Sep 2018 10:32:46 +0000 (18:32 +0800)
committerjohn <john@roojs.com>
Fri, 21 Sep 2018 10:32:46 +0000 (18:32 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/Tooltip.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 6fe2225..a00fcfe 100644 (file)
@@ -270,6 +270,8 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component,  {
             
             var scroll = Roo.select('body', true).first().getScroll();
             
+            Roo.log(this.el.getHeight());
+            
             if(xy[1] + this.el.getHeight() >= Roo.lib.Dom.getViewHeight() + scroll.top){
                 placement = 'top';
             }
index 86c219a..92871ba 100644 (file)
@@ -26207,6 +26207,8 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component,  {
             
             var scroll = Roo.select('body', true).first().getScroll();
             
+            Roo.log(this.el.getHeight());
+            
             if(xy[1] + this.el.getHeight() >= Roo.lib.Dom.getViewHeight() + scroll.top){
                 placement = 'top';
             }
index c629785..01b28b1 100644 (file)
@@ -1088,7 +1088,7 @@ if(!B.getRegion().contains({top:xy[1],right:xy[0],bottom:xy[1],left:xy[0]})){ret
 }},this.delay.show);},leave:function(){clearTimeout(this.timeout);this.hoverState='out';if(!this.delay||!this.delay.hide){this.hide();return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='out'){_t.hide();Roo.bootstrap.Tooltip.currentEl=false;
 }},delay);},show:function(A){if(!this.el){this.render(document.body);}var B=A||this.bindEl.attr('tooltip')||this.bindEl.select("[tooltip]").first().attr('tooltip');this.el.select('.tooltip-inner',true).first().dom.innerHTML=B;this.el.removeClass(['fade','top','bottom','left','right','in']);
 var C=typeof this.placement=='function'?this.placement.call(this,this.el,on_el):this.placement;var D=/\s?auto?\s?/i;var E=D.test(C);if(E){C=C.replace(D,'')||'top';}this.el.show();var p=this.getPosition();var F=this.el.getBox();if(E){}var G=this.alignment[C];
-var xy=this.el.getAlignToXY(this.bindEl,G[0],G[1]);if(C=='top'||C=='bottom'){if(xy[0]<0){C='right';}if(xy[0]+this.el.getWidth()>Roo.lib.Dom.getViewWidth()){C='left';}var H=Roo.select('body',true).first().getScroll();if(xy[1]+this.el.getHeight()>=Roo.lib.Dom.getViewHeight()+H.top){C='top';
+var xy=this.el.getAlignToXY(this.bindEl,G[0],G[1]);if(C=='top'||C=='bottom'){if(xy[0]<0){C='right';}if(xy[0]+this.el.getWidth()>Roo.lib.Dom.getViewWidth()){C='left';}var H=Roo.select('body',true).first().getScroll();Roo.log(this.el.getHeight());if(xy[1]+this.el.getHeight()>=Roo.lib.Dom.getViewHeight()+H.top){C='top';
 }}this.el.alignTo(this.bindEl,G[0],G[1]);this.el.addClass(C);this.el.addClass('in fade');this.hoverState=null;if(this.el.hasClass('fade')){}},hide:function(){if(!this.el){return;}this.el.removeClass('in');}});
 // Roo/bootstrap/LocationPicker.js
 Roo.bootstrap.LocationPicker=function(A){Roo.bootstrap.LocationPicker.superclass.constructor.call(this,A);this.addEvents({initial:true,positionchanged:true,resize:true,show:true,hide:true,mapClick:true,mapRightClick:true,markerClick:true,markerRightClick:true,OverlayViewDraw:true,OverlayViewOnAdd:true,OverlayViewOnRemove:true,OverlayViewShow:true,OverlayViewHide:true,loadexception:true}