OSDN Git Service

Version 0.6.169, add doc comment.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 12_HBox.js
index 1efff7a..6639a7c 100644 (file)
@@ -34,11 +34,11 @@ var XUI_Layout_Horizontal = X[ 'UI' ][ 'Layout' ][ 'Horizontal' ] = XUI_createLa
                autoW          = contentW === XUI_Attr_AUTO;\r
                autoH          = contentH === XUI_Attr_AUTO;\r
                detectionPhase = autoW || autoH;\r
-               gapX           = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.gapX.No ], contentW );\r
-               childW         = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.childWidth.No ], contentW );\r
-               childH         = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.childHeight.No ], contentH );\r
-               _x             = data.contentL;\r
-               _y             = data.contentT;         \r
+               gapX           = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.gapX.No ], contentW );\r
+               childW         = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.childWidth.No ], contentW );\r
+               childH         = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.childHeight.No ], contentH );\r
+               _x             = 0; //data.contentL;\r
+               _y             = 0; //data.contentT;            \r
 \r
                if( !detectionPhase ) ret = false;\r
 \r
@@ -46,14 +46,14 @@ var XUI_Layout_Horizontal = X[ 'UI' ][ 'Layout' ][ 'Horizontal' ] = XUI_createLa
                        _h = 0;\r
                        for( i = 0; i < l; ++i ){\r
                                node = uinodes[ i ];\r
-                               node.calculate( detectionPhase, _x, _y, childW, childH );\r
+                               node.calculate( detectionPhase, _x, 0, childW, childH );\r
                                _x += node.boxWidth + gapX;\r
                                if( autoH ){\r
                                        if( node.boxHeight !== XUI_Attr_AUTO ){\r
                                                h = node.boxHeight;\r
                                        } else\r
-                                       if( node.minBoxHeight !== XUI_Attr_AUTO ){\r
-                                               h = node.minBoxHeight;\r
+                                       if( node.boxHeightMin !== XUI_Attr_AUTO ){\r
+                                               h = node.boxHeightMin;\r
                                                minFlag = true;\r
                                        } else {\r
                                                h = 0;\r
@@ -63,16 +63,16 @@ var XUI_Layout_Horizontal = X[ 'UI' ][ 'Layout' ][ 'Horizontal' ] = XUI_createLa
                        };\r
                        _x -= gapX;\r
                } else {\r
-                       _h = data.minContentHeight !== XUI_Attr_AUTO ? data.minContentHeight : 0;\r
+                       _h = data.contentHeightMin !== XUI_Attr_AUTO ? data.contentHeightMin : 0;\r
                };\r
 \r
                if( detectionPhase ){\r
                        if( autoW ) data.contentWidth  = _x;\r
                        if( autoH ) data.contentHeight = _h;\r
-                       _x = data.contentL;\r
+                       _x = 0; //data.contentL;\r
                        for( i = 0; i < l; ++i ){\r
                                node = uinodes[ i ];\r
-                               node.calculate( false, _x, _y, data.contentWidth, data.contentHeight );\r
+                               node.calculate( false, _x, 0, data.contentWidth, data.contentHeight );\r
                                _x += node.boxWidth + gapX;\r
                        };\r
                        data.postMesure();\r
@@ -105,13 +105,13 @@ X.UI.HBox = X.UI.Box.inherits(
                        var supports;\r
                        \r
                        if( !XUI_HBox ){\r
-                               supports = XUI_Attr_createAttrDef( XUI_Box.prototype.supportAttrs, XUI_Layout_Horizontal.overrideAttrsForSelf );\r
+                               supports = XUI_Attr_createAttrDef( XUI_Box.prototype.usableAttrs, XUI_Layout_Horizontal.overrideAttrsForSelf );\r
                                \r
                                XUI_HBox = XUI_Box.inherits(\r
                                                        {\r
-                                                               layout       : XUI_Layout_Horizontal,\r
-                                                               supportAttrs : supports,\r
-                                                               attrClass    : XUI_Attr_preset( XUI_Box.prototype.attrClass, supports, {\r
+                                                               layout      : XUI_Layout_Horizontal,\r
+                                                               usableAttrs : supports,\r
+                                                               attrClass   : XUI_Attr_preset( XUI_Box.prototype.attrClass, supports, {\r
                                                                                gapX       : '0.2em'\r
                                                                        } )\r
                                                        }\r