From 08837aa1502d8b09467a8f520d03af1d918ee0af Mon Sep 17 00:00:00 2001 From: edward Date: Wed, 22 Nov 2017 12:08:19 +0800 Subject: [PATCH] roojs-all.js roojs-debug.js --- roojs-all.js | 2 +- roojs-debug.js | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index f8429a560e..042dccb087 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -306,7 +306,7 @@ return Roo.isSafari?(A[k]||k):k;},getPageX:function(){return this.xy[0];},getPag if(!L){return null;}var id=L.id;if(K!==true&&id&&Roo.Element.cache[id]){return Roo.Element.cache[id];}this.dom=L;this.id=id||Roo.id(L);};var El=Roo.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(J){this.visibilityMode=J; return this;},enableDisplayMode:function(J){this.setVisibilityMode(El.DISPLAY);if(typeof J!="undefined"){this.originalDisplay=J;}return this;},findParent:function(J,K,L){var p=this.dom,b=document.body,M=0,dq=Roo.DomQuery,N;K=K||50;if(typeof K!="number"){N=Roo.getDom(K); K=10;}while(p&&p.nodeType==1&&M15||D.getViewWidth()-el.dom.clientWidth>15)))&&el.dom.nodeName.toLowerCase()!='body'){el=Roo.get(el.dom.parentNode);}if(!el.isScrollable()){return null;}return el;},up:function(J,K){return this.findParentNode(J,K,true); },is:function(J){return Roo.DomQuery.is(this.dom,J);},animate:function(J,K,L,M,N){this.anim(J,{duration:K,callback:L,easing:M},N);return this;},anim:function(J,K,L,M,N,cb){L=L||'run';K=K||{};var O=Roo.lib.Anim[L](this.dom,J,(K.duration||M)||.35,(K.easing||N)||'easeOut',function(){Roo.callback(cb,this); Roo.callback(K.callback,K.scope||this,[this,K]);},this);K.anim=O;return O;},preanim:function(a,i){return !a[i]?false:(typeof a[i]=="object"?a[i]:{duration:a[i+1],callback:a[i+2],easing:a[i+3]});},clean:function(J){if(this.isCleaned&&J!==true){return this; }var ns=/\S/;var d=this.dom,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!ns.test(n.nodeValue)){d.removeChild(n);}else{n.nodeIndex=++ni;}n=nx;}this.isCleaned=true;return this;},calcOffsetsTo:function(el){el=Roo.get(el);var d=el.dom; diff --git a/roojs-debug.js b/roojs-debug.js index 8c10b3f8e5..715aa79047 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -7172,9 +7172,16 @@ if(opt.anim.isAnimated()){ while ( el && - !el.isScrollable() && - D.getViewHeight() - el.dom.clientHeight <= 15 && - D.getViewWidth() - el.dom.clientWidth <= 15 && + ( + !el.isScrollable() || + ( + el.isScrollable() && + ( + D.getViewHeight() - el.dom.clientHeight > 15 || + D.getViewWidth() - el.dom.clientWidth > 15 + ) + ) + ) && el.dom.nodeName.toLowerCase() != 'body' ){ el = Roo.get(el.dom.parentNode); -- 2.39.2