Roo.extend(Roo.mobile.Mobile, Roo.util.Observable, {
- function init()
+ init: function()
{
//var page = iui.getSelectedPage();
///var locPage = getPageFromLoc();
//if (locPage && (locPage != page))
// iui.showPage(locPage);
-
+ Roo.get(document.head).createChild(
+ '<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>'
+ )
//setTimeout(preloadImages, 0);
if (typeof window.onorientationchange == "object")
{
this.checkOrientAndLocation.defer(0, this);
this.checkTimer = setInterval(checkOrientAndLocation, 300);
}
- function orientChangeHandler()
+ orientChangeHandler: function()
{
if (window.orientation == 90 || window.orientation = -90) {
this.setOrientation("landscape");
}
this.setOrientation("portrait");
- }
+ },
+
+ setOrientation: function (orient)
+ {
+ document.body.setAttribute("orient", orient);
+ setTimeout(scrollTo, 100, 0, 1);
+ },
});