1 var TileLayoutManager = ( new LayoutManagerBase() ).define( {
\r
15 calculate : function( data, x, y, w, h ){
\r
16 var nodes = data.nodes,
\r
17 styleData = data.styleData,
\r
18 cssObj = styleData._cssObj,
\r
19 childW = cssObj.childW,
\r
20 childH = cssObj.childH,
\r
23 padding = cssObj.padding,
\r
26 i = 0, l = nodes.length, node;
\r
28 styleData.layout( x, y, w, 0 );
\r
31 for( ; i < l; ++i ){
\r
33 if( node.instanceOf( _Box ) ){
\r
34 node.calculate( _x, _y, childW, childH );
\r
36 node.styleData.layout( _x, _y, childW, childH );
\r
38 _x += childW + gapX;
\r
40 _y += childH + gapY;
\r
43 styleData.layout( x, y, w, _y + childH + padding );
\r
47 var TileBox = Box.inherits(
\r
49 X.Class.SUPER_ACCESS,
\r
51 Constructor : function(){
\r
52 this.style = DisplayNodeStyle( this, X.Class._newPrivate( this, TileLayoutManager, arguments ) );
\r
53 this.style.addName( 'TileBox' );
\r