X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F20_ui%2F15_ScrollBox.js;h=1fe948633f42e30fa42597a9a8b89d259a45259f;hb=2956150a7c2798e60639b36d69b0c13f6b20a62a;hp=be6884f135f73805a936dd4243b835a2594c19db;hpb=adbf9e9a2c7d8e6857774f774742a7ff6fb50600;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 be6884f..1fe9486 100644 --- a/0.6.x/js/20_ui/15_ScrollBox.js +++ b/0.6.x/js/20_ui/15_ScrollBox.js @@ -44,7 +44,7 @@ var X_UI_ScrollBox_SUPPORT_ATTRS = { var XUI_ScrollBox = XUI_ChromeBox.inherits( '_ScrollBox', - X_Class.PRIVATE_DATA, + X_Class.NONE, { directionLockThreshold : 10, scrollXEnabled : true, @@ -104,9 +104,9 @@ var XUI_ScrollBox = XUI_ChromeBox.inherits( _containerNode : null, xnodeSlider : null, - Constructor : function( layout, args ){ - this[ 'Super' ]( layout, args ); - this._containerNode = X_Class_getPrivate( this.containerNode ); + Constructor : function( user, layout, args ){ + this[ 'Super' ]( user, layout, args ); + this._containerNode = X_Pair_get( this.containerNode ); this.xnodeSlider = this._containerNode.xnode[ 'className' ]( 'ScrollSlider' ).listen( X_EVENT_ANIME_END, this, X_UI_ScrollBox_onAnimeEnd ); this.xnode[ 'className' ]( 'ScrollBox' ); }, @@ -503,26 +503,26 @@ function X_UI_ScrollBox_onAnimeEnd( e ){ }; if( !X_UI_ScrollBox_resetPosition( this, this.bounceTime ) ){ this.isInTransition = false; - this.dispatch( XUI_Event.SCROLL_END ); + this[ 'dispatch' ]( XUI_Event.SCROLL_END ); }; return X_Callback_NONE; }; +// TODO Box の継承に! X.UI.ScrollBox = X.UI.ChromeBox.inherits( 'ScrollBox', X_Class.NONE, - XUI_ScrollBox, { Constructor : function(){ var args = [ - XUI_Layout_Vertical, + XUI_Layout_Canvas, { - name : 'ScrollBox-Scroller', - role : 'container', - width : 'auto', - minWidth : '100%', - height : 'auto', - minHeight : '100%' + name : 'ScrollBox-Scroller', + role : 'container', + width : 'auto', + minWidth : '100%', + height : 'auto', + minHeight : '100%' } ], i = arguments.length, @@ -541,16 +541,19 @@ X.UI.ScrollBox = X.UI.ChromeBox.inherits( }; }; - X_Class_newPrivate( + X_Pair_create( this, - XUI_Layout_Canvas, - [ - { - width : '100%', - height : '100%' - }, - X.UI.VBox.apply( 0, args ) - ] + XUI_ScrollBox( + this, + XUI_Layout_Canvas, + [ + { + width : '100%', + height : '100%' + }, + X.UI.VBox.apply( 0, args ) + ] + ) ); attr && this.attr( attr );