roojs-core.js
[roojs1] / roojs-debug.js
index 1005e3c..57accf4 100644 (file)
@@ -7046,7 +7046,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.
@@ -8126,7 +8126,7 @@ if(opt.anim.isAnimated()){
                     return 0;
                 }
                 
-                if(new RegExp(this.pxReg).test(x)){
+                if(this.pxReg.test(x)){
                     return parseFloat(x);
                 }