From: leon Date: Tue, 27 Sep 2022 03:53:16 +0000 (+0800) Subject: roojs-bootstrap.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=491692f1e37316cdb890285e264a5f0c1ffb3653 roojs-bootstrap.js roojs-bootstrap-debug.js --- diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index b5197a6e66..40bcf30a02 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -32568,6 +32568,9 @@ Roo.apply(Roo.bootstrap.Tooltip, { //Roo.log(['enter',dom]); var el = Roo.fly(dom); + Roo.log("Tooltip enter"); + Roo.log(el); + Roo.log(dom); if (this.currentEl) { //Roo.log(dom); //Roo.log(this.currentEl); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 685798eac5..978120ed6f 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1410,7 +1410,7 @@ Roo.bootstrap.dash=Roo.bootstrap.dash||{};Roo.bootstrap.dash.TabPane=function(A) ;if(this.active){A.cls+=' active';}return A;},initEvents:function(){this.parent().fireEvent('addpane',this)},setTitle:function(A){if(!this.tab){return;}this.title=A;this.tab.select('a',true).first().dom.innerHTML=A;}}); // Roo/bootstrap/Tooltip.js Roo.bootstrap.Tooltip=function(A){Roo.bootstrap.Tooltip.superclass.constructor.call(this,A);this.alignment=Roo.bootstrap.Tooltip.alignment;if(typeof(A)!='undefined'&&typeof(A.alignment)!='undefined'){this.alignment=A.alignment;}};Roo.apply(Roo.bootstrap.Tooltip,{currentEl:false,currentTip:false,currentRegion:false,init:function(){Roo.get(document).on('mouseover',this.enter,this); -Roo.get(document).on('mouseout',this.leave,this);this.currentTip=new Roo.bootstrap.Tooltip();},enter:function(ev){var A=ev.getTarget();var el=Roo.fly(A);if(this.currentEl){if(this.currentEl==el){return;}if(A!=this.currentEl.dom&&this.currentEl.contains(A)){return; +Roo.get(document).on('mouseout',this.leave,this);this.currentTip=new Roo.bootstrap.Tooltip();},enter:function(ev){var A=ev.getTarget();var el=Roo.fly(A);Roo.log("Tooltip enter");Roo.log(el);Roo.log(A);if(this.currentEl){if(this.currentEl==el){return;}if(A!=this.currentEl.dom&&this.currentEl.contains(A)){return; }}if(this.currentTip.el){this.currentTip.el.setVisibilityMode(Roo.Element.DISPLAY).hide();}if(!el||el.dom==document){return;}var B=el;var C=false;if(!el.attr('tooltip')){C=el.findParent("[tooltip]");if(C){B=Roo.get(C);}}if(!C&&!el.attr('tooltip')){if(!el.select("[tooltip]").elements.length){return; }B=el.select("[tooltip]").first();var xy=ev.getXY();if(!B.getRegion().contains({top:xy[1],right:xy[0],bottom:xy[1],left:xy[0]})){return;}}this.currentEl=el;this.currentTip.bind(B);this.currentRegion=Roo.lib.Region.getRegion(A);this.currentTip.enter();},leave:function(ev){var A=ev.getTarget(); if(!this.currentEl){return;}if(A!=this.currentEl.dom){return;}var xy=ev.getXY();if(this.currentRegion.contains(new Roo.lib.Region(xy[1],xy[0],xy[1],xy[0]))){return;}if(this.currentTip){this.currentTip.leave();}this.currentEl=false;},alignment:{'left':['r-l',[-2,0],'right'],'right':['l-r',[2,0],'left'],'bottom':['t-b',[0,2],'top'],'top':['b-t',[0,-2],'bottom']}