Roo/Element.js
[roojs1] / roojs-core-debug.js
index bf06c20..32f8f0a 100644 (file)
@@ -6584,6 +6584,9 @@ Roo.onReady(function(){
     if(Roo.isIOS){
         cls.push("roo-ios");
     }
+    if(Roo.isTouch){
+        cls.push("roo-touch");
+    }
     if(Roo.isBorderBox){
         cls.push('roo-border-box');
     }
@@ -7046,7 +7049,6 @@ if(opt.anim.isAnimated()){
          */
         defaultUnit : "px",
         
-        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.
@@ -8120,25 +8122,7 @@ if(opt.anim.isAnimated()){
             if(!local){
                 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  par = this.dom.offsetParent ? Roo.fly(this.dom.offsetParent) : false;
-                
-                 if (par !== false) {
-                    x -= par.getX();
-                }
-
-                return x;
+                return parseInt(this.getStyle("left"), 10) || 0;
             }
         },
 
@@ -9026,7 +9010,7 @@ if(opt.anim.isAnimated()){
             
             // we wander
             var z = 0;
-            var dom = this.dom
+            var dom = this.dom;
             while (dom && dom.style) {
                 if (!isNaN(parseInt(dom.style.zIndex))) {
                     z = Math.max(z, parseInt(dom.style.zIndex));