From 222c15af2f940b9a9c8fd5e6ed1b62289d438c4f Mon Sep 17 00:00:00 2001 From: john Date: Fri, 21 Sep 2018 18:32:12 +0800 Subject: [PATCH] Roo/bootstrap/Tooltip.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/Tooltip.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/Tooltip.js b/Roo/bootstrap/Tooltip.js index 8645ebd41f..6fe2225ea7 100644 --- a/Roo/bootstrap/Tooltip.js +++ b/Roo/bootstrap/Tooltip.js @@ -270,7 +270,7 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component, { var scroll = Roo.select('body', true).first().getScroll(); - if(xy[1] > Roo.lib.Dom.getViewHeight() + scroll.top - this.el.getHeight()){ + if(xy[1] + this.el.getHeight() >= Roo.lib.Dom.getViewHeight() + scroll.top){ placement = 'top'; } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 4eff8591e5..86c219a16d 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -26207,7 +26207,7 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component, { var scroll = Roo.select('body', true).first().getScroll(); - if(xy[1] > Roo.lib.Dom.getViewHeight() + scroll.top - this.el.getHeight()){ + if(xy[1] + this.el.getHeight() >= Roo.lib.Dom.getViewHeight() + scroll.top){ placement = 'top'; } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index a3489aeee0..c629785b09 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -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]>Roo.lib.Dom.getViewHeight()+H.top-this.el.getHeight()){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();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} -- 2.39.2