Roo/mobile/Mobile.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 24 Nov 2010 08:07:23 +0000 (16:07 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 24 Nov 2010 08:07:23 +0000 (16:07 +0800)
Roo/mobile/Mobile.js

index 9e7f3f2..6c12fcd 100644 (file)
@@ -49,6 +49,16 @@ Roo.extend(Roo.mobile.Mobile, Roo.util.Observable, {
         this.checkOrientAndLocation.defer(0, this);
         this.checkTimer = setInterval(checkOrientAndLocation, 300);
     }
+    function orientChangeHandler()
+    {
+        if (window.orientation == 90 || window.orientation = -90) {
+            this.setOrientation("landscape");
+            return;
+        }
+        this.setOrientation("portrait");
+        
+    }
+
 });