Roo/bootstrap/TabPanel.js
authoredward <edward@roojs.com>
Tue, 17 Oct 2017 03:45:32 +0000 (11:45 +0800)
committeredward <edward@roojs.com>
Tue, 17 Oct 2017 03:45:32 +0000 (11:45 +0800)
Roo/bootstrap/TabPanel.js

index daf7d38..abc931b 100644 (file)
@@ -100,9 +100,9 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
         }
         
         if(Roo.isTouch && this.swiping){
-            p.el.on("touchstart", this.onTouchStart, this);
-            p.el.on("touchmove", this.onTouchMove, this);
-            p.el.on("touchend", this.onTouchEnd, this);
+            this.el.on("touchstart", this.onTouchStart, this);
+            this.el.on("touchmove", this.onTouchMove, this);
+            this.el.on("touchend", this.onTouchEnd, this);
         }
         
     },
@@ -132,8 +132,39 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
         e.preventDefault();
         
         window.location.href = this.href;
+    },
+    
+    onTouchStart : function(e)
+    {
+        e.preventDefault();
+        
+        Roo.log('on touch start');
+        
+        Roo.log(e);
+        
+        Roo.log(e.browserEvent.touches[0].clientX);
+    },
+    
+    onTouchMove : function(e)
+    {
+        e.preventDefault();
+        
+        Roo.log('on touch move');
+        
+        Roo.log(e);
+    },
+    
+    onTouchEnd : function(e)
+    {
+        e.preventDefault();
+        
+        Roo.log('on touch end');
+        
+        Roo.log(e);
+        
     }
     
+    
 });