Roo/Element.js
authoredward <edward@roojs.com>
Thu, 28 Jan 2016 09:10:40 +0000 (17:10 +0800)
committeredward <edward@roojs.com>
Thu, 28 Jan 2016 09:10:40 +0000 (17:10 +0800)
Roo/Element.js

index 1da3cfa..e6e1a1a 100644 (file)
@@ -125,7 +125,7 @@ if(opt.anim.isAnimated()){
          */
         defaultUnit : "px",
         
-        pxReg : '/^\d+(?:\.\d*)?px$/i',
+        pxReg : /^\d+(?:\.\d*)?px$/i,
         /**
          * Sets the element's visibility mode. When setVisible() is called it
          * will use this to determine whether to set the visibility or the display property.
@@ -1205,7 +1205,7 @@ if(opt.anim.isAnimated()){
                     return 0;
                 }
                 
-                if(new RegExp(this.pxReg).test(x)){
+                if(this.pxReg.test(x)){
                     return parseFloat(x);
                 }