2011-12-21 27 views
3

orienatationをポートレートからランドスケープに変更すると、iScrollに問題が発生します。それはAppMobi XDKに取り組んでいますが、iPhoneでは正しくレンダリングされません。 orientationchangeイベントをトラップしようとしましたが、別のタイムアウト値でiScrollのrefreshメソッドを呼び出しましたが、運はありません。オリエンテーションを変更するとiscrollの問題が発生する

// My code sample for the orientation change event 
document.addEventListener("appMobi.device.orientation.change", orientationChange, false); 
function orientationChange(){  
    setTimeout(function() { myScroll.refresh() }, 0); 
    //alert("Orientation Change"); 
} 

誰でも手助けできますか?

答えて

0

あなたは

window.addEventListener("resize", function() { 
// Get screen size (inner/outerWidth, inner/outerHeight) 
}, false); 
のサイズを変更するイベントを試すことができます
関連する問題