_x = data.contentL;\r
_y = data.contentT;\r
_w = data.contentWidth;\r
- gapX = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.gapX.No ], contentW );\r
- gapY = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.gapY.No ], contentH );\r
- childW = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.childWidth.No ], contentW );\r
- childH = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.childHeight.No ], contentH );\r
+ gapX = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.gapX.No ], contentW );\r
+ gapY = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.gapY.No ], contentH );\r
+ childW = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.childWidth.No ], contentW );\r
+ childH = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.childHeight.No ], contentH );\r
numH = XUI_Attr_FLOOR( ( _w + gapX ) / ( childW + gapX ) );\r
numV = l % numH ? XUI_Attr_FLOOR( l / numH ) + 1 : l / numH;\r
_h = _y + data.contentB + ( childH + gapY ) * numH - gapY;\r
\r
- startX = attrs[ data.supportAttrs.hCenter.No ] ?\r
+ startX = attrs[ data.usableAttrs.hCenter.No ] ?\r
( _w - ( childW + gapX ) * numH - gapX ) / 2 : _x;\r
__x = startX;\r
- __y = attrs[ data.supportAttrs.vCenter.No ] && _h <= h ?\r
+ __y = attrs[ data.usableAttrs.vCenter.No ] && _h <= h ?\r
( h - _h ) / 2 + _y : _y;\r
\r
for( i = 0; i < l; ++i ){\r
\r
} else\r
if( data.contentHeight === XUI_Attr_AUTO ){\r
- data.contentHeight = data.minContentHeight !== XUI_Attr_AUTO ? data.minContentHeight : 0;\r
+ data.contentHeight = data.contentHeightMin !== XUI_Attr_AUTO ? data.contentHeightMin : 0;\r
};\r
\r
data.postMesure();\r
}\r
});\r
\r
+/*\r
X.UI.TileBox = X.UI.Box.presets(\r
'TileBox',\r
XUI_Layout_Tile,\r
hCenter : true,\r
vCenter : true\r
}\r
-);\r
+);*/\r
+\r
+X.UI.TileBox = X.UI.Box.inherits(\r
+ 'TileBox',\r
+ X_Class.NONE,\r
+ {\r
+ Constructor : function(){\r
+ var supports;\r
+ \r
+ if( !XUI_TileBox ){\r
+ supports = XUI_Attr_createAttrDef( XUI_Box.prototype.usableAttrs, XUI_Layout_Tile.overrideAttrsForSelf );\r
+ \r
+ XUI_TileBox = XUI_Box.inherits(\r
+ {\r
+ layout : XUI_Layout_Tile,\r
+ usableAttrs : supports,\r
+ attrClass : XUI_Attr_preset( XUI_Box.prototype.attrClass, supports, {\r
+ gapX : '0.2em',\r
+ gapY : '0.2em',\r
+ hCenter : true,\r
+ vCenter : true\r
+ })\r
+ }\r
+ ); \r
+ };\r
+ X_Pair_create( this, XUI_TileBox( this, XUI_Layout_Tile, arguments ) );\r
+ }\r
+ });
\ No newline at end of file