X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F20_ui%2F14_ChromeBox.js;h=06ea4a5f0b005961b22e6512a2d7972a6874a032;hb=3d352d8bf476ab57cc333e8d02d0e6ea5efa69b7;hp=82b387bb137fbbbd1ef475b4d8354cd78be9d203;hpb=2956150a7c2798e60639b36d69b0c13f6b20a62a;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/20_ui/14_ChromeBox.js b/0.6.x/js/20_ui/14_ChromeBox.js index 82b387b..06ea4a5 100644 --- a/0.6.x/js/20_ui/14_ChromeBox.js +++ b/0.6.x/js/20_ui/14_ChromeBox.js @@ -51,16 +51,19 @@ X.UI.ChromeBox = X.UI.Box.inherits( Constructor : function(){ X_Pair_create( this, XUI_ChromeBox( this, XUI_Layout_Canvas, arguments ) ); }, - add : function( node /* , node, node ... */ ){ - X_Pair_get( this ).containerNode.addAt( this.numNodes(), Array.prototype.slice.call( arguments ) ); + add : function( /* node, node, node ... */ ){ + X_Pair_get( this ).containerNode.addAt( this.numNodes(), X_Array_copy( arguments ) ); return this; }, - addAt : function( index, node /* , node, node ... */ ){ - X_Pair_get( this ).containerNode.addAt( index, Array.prototype.slice.call( arguments, 1 ) ); + addAt : function( index /* , node, node, node ... */ ){ + var nodes; + if( index < 0 ) index = 0; + nodes = X_Array_copy( arguments ); + X_Pair_get( this ).containerNode.addAt( nodes.shift(), nodes ); return this; }, remove : function( node /* , node, node ... */ ){ - X_Pair_get( this ).containerNode[ 'remove' ]( arguments ); + X_Pair_get( this ).containerNode.remove( arguments ); return this; }, removeAt : function( from, length ){ @@ -76,26 +79,11 @@ X.UI.ChromeBox = X.UI.Box.inherits( getLastChild : function(){ return X_Pair_get( this ).containerNode.User.getLastChild(); }, - getNodeByUID : function( uid ){ - return X_Pair_get( this ).containerNode.User.getNodeByUID(); - }, getNodeAt : function( index ){ return X_Pair_get( this ).containerNode.User.getNodeAt( index ); }, numNodes : function(){ return X_Pair_get( this ).containerNode.User.numNodes(); - }, - getContainerNode : function(){ - return X_Pair_get( this ).containerNode.User; - }, - getChromeNodeAt : function( index ){ - if( index < 0 ) return null; - var nodes = X_Pair_get( this ).chromeNodes; - return nodes ? nodes[ index ].User || null : null; - }, - numChromeNodes : function(){ - var nodes = X_Pair_get( this ).chromeNodes; - return nodes ? nodes.length : 0; } } ); \ No newline at end of file