2008. 10. 30. 11:05
등록 부분
initialize: function(id, container){
    (...)

    var thisP = this;
    AzLib.Event.observe(
        this._element,
        AzLib.Browser.Gecko ?
            "DOMMouseScroll" :
           "mousewheel",
        function(e){
            thisP.__event_mouseWheel(e);
        }
    );

    (...)
}

콜백 부분
__event_mouseWheel: function(e){
    AzLib.Event.stop(e);
    var delta = 0;
    if (e.wheelDelta) { /* IE, Opera, Safari, Chrome */
        delta = -e.wheelDelta / (AzLib.Browser.Chrome? 360: 120);
    } else if (e.detail) { /* Gecko */
        delta = e.detail / 3;
    }
    this._verticalScrollbar.stepPosition(delta * this.wheelRowCount);
}

mouse wheel 관련 자료를 찾아보니 살짝? 오동작도 하고 크롬 브라우저에 대한 처리가 안되어있어 수정하여 적용중인 코드.

IE6, IE7, IE8beta, FF2, Opera9, Safari3, Chrome0.2 에서 테스트 됨.
Posted by 아즈키

댓글을 달아 주세요