2011-12-21 6 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); 
관련 문제