roojs-core.js
authoredward <edward@roojs.com>
Thu, 28 Jan 2016 09:07:44 +0000 (17:07 +0800)
committeredward <edward@roojs.com>
Thu, 28 Jan 2016 09:07:44 +0000 (17:07 +0800)
roojs-core-debug.js

roojs-core-debug.js
roojs-core.js

index 05ee001..bf06c20 100644 (file)
@@ -8126,7 +8126,7 @@ if(opt.anim.isAnimated()){
                     return 0;
                 }
                 
-                if(this.pxReg.test(x)){
+                if(new RegExp(this.pxReg).test(x)){
                     return parseFloat(x);
                 }
                 
index b1d260d..711eae2 100644 (file)
@@ -337,7 +337,7 @@ if(!h){h=parseInt(this.getStyle('height'),10)||0;if(!this.isBorderBox()){h+=this
 }else{this.anim({width:{to:J},height:{to:K}},this.preanim(arguments,2));}return this;},setBounds:function(x,y,J,K,L){if(!L||!A){this.setSize(J,K);this.setLocation(x,y);}else{J=this.adjustWidth(J);K=this.adjustHeight(K);this.anim({points:{to:[x,y]},width:{to:J},height:{to:K}},this.preanim(arguments,4),'motion');
 }return this;},setRegion:function(J,K){this.setBounds(J.left,J.top,J.right-J.left,J.bottom-J.top,this.preanim(arguments,1));return this;},addListener:function(J,fn,K,L){if(this.dom){Roo.EventManager.on(this.dom,J,fn,K||this,L);}},removeListener:function(J,fn){Roo.EventManager.removeListener(this.dom,J,fn);
 return this;},removeAllListeners:function(){E.purgeElement(this.dom);return this;},relayEvent:function(J,K){this.on(J,function(e){K.fireEvent(J,e);});},setOpacity:function(J,K){if(!K||!A){var s=this.dom.style;if(Roo.isIE){s.zoom=1;s.filter=(s.filter||'').replace(/alpha\([^\)]*\)/gi,"")+(J==1?"":"alpha(opacity="+J*100+")");
-}else{s.opacity=J;}}else{this.anim({opacity:{to:J}},this.preanim(arguments,1),null,.35,'easeIn');}return this;},getLeft:function(J){if(!J){return this.getX();}else{var x=this.getStyle("left");if(!x||x==='AUTO'){return 0;}if(this.pxReg.test(x)){return parseFloat(x);
+}else{s.opacity=J;}}else{this.anim({opacity:{to:J}},this.preanim(arguments,1),null,.35,'easeIn');}return this;},getLeft:function(J){if(!J){return this.getX();}else{var x=this.getStyle("left");if(!x||x==='AUTO'){return 0;}if(new RegExp(this.pxReg).test(x)){return parseFloat(x);
 }x=this.getX();var K=this.dom.offsetParent?Roo.fly(this.dom.offsetParent):false;if(K!==false){x-=K.getX();}return x;}},getRight:function(J){if(!J){return this.getX()+this.getWidth();}else{return (this.getLeft(true)+this.getWidth())||0;}},getTop:function(J){if(!J){return this.getY();
 }else{return parseInt(this.getStyle("top"),10)||0;}},getBottom:function(J){if(!J){return this.getY()+this.getHeight();}else{return (this.getTop(true)+this.getHeight())||0;}},position:function(J,K,x,y){if(!J){if(this.getStyle('position')=='static'){this.setStyle('position','relative');
 }}else{this.setStyle("position",J);}if(K){this.setStyle("z-index",K);}if(x!==undefined&&y!==undefined){this.setXY([x,y]);}else if(x!==undefined){this.setX(x);}else if(y!==undefined){this.setY(y);}},clearPositioning:function(J){J=J||'';this.setStyle({"left":J,"right":J,"top":J,"bottom":J,"z-index":"","position":"static"});