X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F20_ui%2F15_ScrollBox.js;h=be6884f135f73805a936dd4243b835a2594c19db;hb=0660e56af40d5df36e49c7a2deb7ec7e6638df98;hp=43b57cfabdbe988c2fbaa145b2a133c4960543c6;hpb=136b808d09fef278c92b1c1c2cecf67f1383314d;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/20_ui/15_ScrollBox.js b/0.6.x/js/20_ui/15_ScrollBox.js index 43b57cf..be6884f 100644 --- a/0.6.x/js/20_ui/15_ScrollBox.js +++ b/0.6.x/js/20_ui/15_ScrollBox.js @@ -284,6 +284,8 @@ function X_UI_ScrollBox_onStart( e ){ this.pointX = e.pageX; this.pointY = e.pageY; + console.log( 'scrollstart ' + e.pageY ); + this[ 'listen' ]( XUI_Event._POINTER_MOVE, this, X_UI_ScrollBox_onMove ); this[ 'listen' ]( [ XUI_Event._POINTER_UP, XUI_Event._POINTER_CANCEL ], this, X_UI_ScrollBox_onEnd ); @@ -296,7 +298,9 @@ function X_UI_ScrollBox_onMove( e ){ newX, newY, absDistX, absDistY; // 規定以上の move でスクロール開始 - + +console.log( 'scrollmove ' + e.buttons + ' ' + e.button ); + if( !this.scrollEnabled || e.pointerType !== this.initiated ){ return ret; }; @@ -422,7 +426,7 @@ function X_UI_ScrollBox_onEnd( e ){ // we scrolled less than 10 pixels if( !this.moved ){ // this[ 'dispatch' ]( X_EVENT_CANCELED ); - console.log( 'we scrolled less than 10 pixels' ); + console.log( 'we scrolled less than 10 pixels ' + e.pageY ); return ret; };